where.asciidoc 728 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. [discrete]
  2. [[esql-where]]
  3. === `WHERE`
  4. **Syntax**
  5. [source,esql]
  6. ----
  7. WHERE expression
  8. ----
  9. *Parameters*
  10. `expression`::
  11. A boolean expression.
  12. *Description*
  13. The `WHERE` processing command produces a table that contains all the rows from
  14. the input table for which the provided condition evaluates to `true`.
  15. `WHERE` supports various <<esql-functions,functions>> and
  16. <<esql-operators,operators>>.
  17. *Examples*
  18. [source,esql]
  19. ----
  20. include::{esql-specs}/docs.csv-spec[tag=where]
  21. ----
  22. Which, if `still_hired` is a boolean field, can be simplified to:
  23. [source,esql]
  24. ----
  25. include::{esql-specs}/docs.csv-spec[tag=whereBoolean]
  26. ----
  27. Using a function:
  28. [source,esql]
  29. ----
  30. include::{esql-specs}/docs.csv-spec[tag=whereFunction]
  31. ----