Apache Druid supports two query languages: Druid SQL and native queries.
This document describes the SQL language.

Operators in Druid SQL typically operate on one or two values and return a result based on the values. Types of operators in Druid SQL include arithmetic, comparison, logical, and more, as described here.

Arithmetic operators

Operator

Description

x + y

Add

x - y

Subtract

x * y

Multiply

x / y

Divide

Datetime arithmetic operators

For the datetime arithmetic operators, interval_expr can include interval literals like INTERVAL '2' HOUR.
This operator treats days as uniformly 86400 seconds long, and does not take into account daylight savings time.
To account for daylight savings time, use the TIME_SHIFT function.
Also see TIMESTAMPADD for datetime arithmetic.