Select Event DateTime, DateTime64 or UInt32 column for binding with Grafana's range selector
Leave blank for auto handling based on time range and panel width
Set rounding for `$from` and `$to` timestamps.
For example, if set `1m` - both `$from` and `$to` will be rounded to beginning of minute.

Or set to `$step` to automatically adjust according to `Step * Resolution` value.

It will make all requests similar during one minute which is good for caching.
{{ctrl.target.rawQuery}}
Macros

$table - replaced with selected table name from Query Builder
$dateCol - replaced with Date:Col value from Query Builder
$dateTimeCol - replaced with Column:DateTime or Column:TimeStamp value from Query Builder
$from - replaced with (timestamp with ms)/1000 value of UI selected "Time Range:From"
$to - replaced with (timestamp with ms)/1000 value of UI selected "Time Range:To"
$interval - replaced with selected "Group by time interval" value (as a number of seconds)
$timeFilter - replaced with currently selected "Time Range".
            Require Column:Date and Column:DateTime or Column:TimeStamp to be selected
$timeSeries - replaced with special ClickHouse construction to convert results as time-series data.
            Use it as "SELECT $timeSeries...". Require Column:DateTime or Column:TimeStamp to be selected
$unescape - unescapes variable value by removing single quotes.
            Used for multiple-value string variables: "SELECT $unescape($column) FROM requests WHERE $unescape($column) = 5"
$adhoc - replaced with a rendered ad-hoc filter expression, or "1" if no ad-hoc filters exist
A description of macros is available by typing their names in Raw Editor


Functions (Only one function per query allowed)

$rate(cols...) - function to convert query results as "change rate per interval".
Example usage: $rate(countIf(Type = 200) * 60 AS good, countIf(Type != 200) * 60 AS bad) FROM requests

$columns(key, value) - function to query values as array of [key, value], where key would be used as label.
Example usage: $columns(Type, count() c) FROM requests

$rateColumns(key, value) - is an combination of $columns and $rate.
Example usage: $rateColumns(Type, count() c) FROM requests