IMPORTANT: Version 6.3 of Elasticsearch has passed its maintenance date.
This documentation is no longer being updated. For the latest information, see the current release documentation.
Elasticsearch SQL supports the following math operators:
- Add (
+
)
SELECT 1 + 1 AS x;
- Subtract (infix
-
)
SELECT 1 - 1 AS x;
- Negate (unary
-
)
SELECT - 1 AS x;
- Multiply (
*
)
SELECT 2 * 3 AS x;
- Divide (
/
)
SELECT 6 / 3 AS x;
- Modulo or Reminder(
%
)
SELECT 5 % 2 AS x;