WHERE statement is used to extract the logs that meet the specified conditions.* | SELECT column (KEY) WHERE column (KEY) operator value
=, <>, >, <, >=, <=, BETWEEN, IN, or LIKE.status:>400 | select count(*) as logCounts instead of * | select count(*) as logCounts where status>400 to get the statistical result faster.WHERE statement does not allow the AS clause. For example, if level:* | select level as log_level where log_level='ERROR' is run, an error will be reported because the statement does not comply with the SQL-92 specifications.* | SELECT * WHERE status > 400
* | SELECT count(*) as count WHERE method='GET' and remote_addr='192.168.10.101'
* | SELECT round(sum(body_bytes_sent) / count(body_bytes_sent), 2) AS avg_size WHERE url like '%.mp4'
Feedback