Hello Everyone,
I noticed that commas are not necessary when searching as the following would give the same results.
... | stats count, value(product_id) ...
OR
... | stats count value(product_id) ...
Just want to confirm my assumption of commas as a syntax aid is correct.
Thanks.
In that case, commas are indeed optional. However, not all commas are optional - here's an example:
index=_internal | timechart avg(bytes) as bytes, values(sourcetype) as sourcetypes | eval bytes = round(bytes, 2)
The first comma is optional, the second is not.
Thanks a lot.
In that case, commas are indeed optional. However, not all commas are optional - here's an example:
index=_internal | timechart avg(bytes) as bytes, values(sourcetype) as sourcetypes | eval bytes = round(bytes, 2)
The first comma is optional, the second is not.
Thanks a lot.
As per my understanding "," is optional for statistical or formatting commands like stats, chart, timechart, table, fields. They do increase the readability of the code.