Math Operators

edit

This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.

Perform mathematical operations affecting one or two values. The result is a value of numeric type.

  • 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;
SELECT 5 % 2 AS x;