elasticsearch/docs/reference/esql/processing-commands/where.asciidoc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
728 B
Plaintext
Raw Normal View History

[discrete]
[[esql-where]]
=== `WHERE`
**Syntax**
[source,esql]
----
WHERE expression
----
*Parameters*
`expression`::
A boolean expression.
*Description*
The `WHERE` processing command produces a table that contains all the rows from
the input table for which the provided condition evaluates to `true`.
`WHERE` supports various <<esql-functions,functions>> and
<<esql-operators,operators>>.
*Examples*
[source,esql]
----
include::{esql-specs}/docs.csv-spec[tag=where]
----
Which, if `still_hired` is a boolean field, can be simplified to:
[source,esql]
----
include::{esql-specs}/docs.csv-spec[tag=whereBoolean]
----
Using a function:
[source,esql]
----
include::{esql-specs}/docs.csv-spec[tag=whereFunction]
----