Last updated: April 16, 2026
Use Supported Functions
The following functions are available in Dash0 SQL, grouped by category.
Aggregation
| Function | Description |
|---|---|
count() | Count of rows |
countIf(condition) | Count of rows matching a condition |
sum(col) | Sum of values |
avg(col) | Average of values |
max(col) | Maximum value |
min(col) | Minimum value |
uniq(col) | Approximate count of distinct values |
any(col) | Returns an arbitrary value from the group |
topK(n, col) | Returns the top n most frequent values |
toString(val) | Converts a value to string |
toInt64OrZero(val) | Converts a value to integer, returns 0 on failure |
String
| Function | Description |
|---|---|
concat(s1, s2, ...) | Concatenates strings |
substring(s, offset, length) | Extracts a substring |
lower(s) | Converts to lowercase |
upper(s) | Converts to uppercase |
replaceAll(s, pattern, replacement) | Replaces all occurrences of a substring |
like(s, pattern) | Case-sensitive pattern match (% wildcard) |
ilike(s, pattern) | Case-insensitive pattern match (% wildcard) |
match(s, pattern) | Tests a string against a regular expression |
extract(s, pattern) | Extracts the first regex match from a string |
regexpExtract(s, pattern, group) | Extracts a named or numbered capture group |
extractGroups(s, pattern) | Returns all capture groups as an array |
Date
| Function | Description |
|---|---|
now() | Current timestamp |
today() | Current date (midnight) |
Array
| Function | Description |
|---|---|
length(arr) | Number of elements in an array |
has(arr, value) | Returns true if the array contains the value |
Math
| Function | Description |
|---|---|
round(n) | Rounds to the nearest integer |
floor(n) | Rounds down |
ceil(n) | Rounds up |
abs(n) | Absolute value |
coalesce(v1, v2, ...) | Returns the first non-null value in the list |
Logic
| Function | Description |
|---|---|
if(condition, then, else) | Returns then if condition is true, otherwise else |
multiIf(c1, v1, c2, v2, ..., else) | Chained conditional, equivalent to CASE WHEN |
JSON
| Function | Description |
|---|---|
JSONExtract(json, type) | Extracts a value from JSON, cast to the given type |
JSONExtractString(json, path) | Extracts a string value |
JSONExtractInt(json, path) | Extracts an integer value |
JSONExtractUInt(json, path) | Extracts an unsigned integer value |
JSONExtractFloat(json, path) | Extracts a float value |
JSONExtractBool(json, path) | Extracts a boolean value |
JSONExtractArrayRaw(json, path) | Extracts an array as raw JSON |
JSONExtractRaw(json, path) | Extracts a value as raw JSON |
JSONExtractKeys(json) | Returns the keys of a JSON object as an array |
JSONExtractKeysAndValues(json, type) | Returns key-value pairs, values cast to the given type |
JSONExtractKeysAndValuesRaw(json) | Returns key-value pairs as raw JSON |
JSONHas(json, path) | Returns true if the path exists in the JSON |
JSONLength(json) | Returns the number of keys or array elements |
JSONType(json) | Returns the type of the JSON value (e.g. String, Array) |
isValidJSON(s) | Returns true if the string is valid JSON |
toJSONString(val) | Serializes a value to a JSON string |
Further Reading
- Write SQL Queries: the editor, time window behaviour, and keyboard shortcuts.
- Use Query Templates: browse and run built-in templates by signal type.
- Manage Saved Queries: recent query history and saved views.
- Explore Your Schema: discover available tables, columns, and supported functions.
- Troubleshoot SQL Queries: common issues and fixes.