Skip to main content

Query Operators

Pipe operators form the backbone of any KQL query. Each operator corresponds to a SQL construct — for example, where maps to a WHERE clause, summarize maps to GROUP BY, and take maps to LIMIT. Chained operators are composed as nested subqueries when required by the target dialect.

Legend: ✅ Supported · ⚠️ Approximated · ❌ Not Supported · 🔄 Rewritten

OperatorSQLiteMySQLClickHousePostgreSQLNotes
whereChained where clauses are ANDed
projectMapped to SELECT
project-awayRemoves named columns from SELECT
project-keepKeeps only named columns
project-renameColumn alias
project-reorderReorders SELECT list
extendAdds computed columns
summarizeMaps to GROUP BY
summarize (no by)Global aggregate, no GROUP BY
order by
sort byAlias for order by
top N byMaps to ORDER BY + LIMIT
takeMaps to LIMIT
limitAlias for take
countWraps as subquery + COUNT(*)
distinctMaps to SELECT DISTINCT
unionUNION ALL
union withsource=Adds source column to each branch
joinSee Join Types
lookupDefaults to LEFT JOIN
asTable alias
let (expression)Inlined as expression
let (tabular query)Mapped to CTE
let (function)⚠️⚠️⚠️⚠️Stored as UDF stub only; function body not executed
let (datatable)CREATE TEMP TABLE + INSERT
mv-expand🔄🔄ClickHouse: ARRAY JOIN; Postgres: CROSS JOIN LATERAL unnest(); MySQL/SQLite: unsupported
mv-apply🔄🔄Same as mv-expand per dialect
parse⚠️⚠️⚠️Uses extractAll(); non-ClickHouse dialects emit unsupported warning
parse-where⚠️⚠️⚠️Like parse but also filters non-matching rows
parse-kvClickHouse only via extractKeyValuePairs
sampleORDER BY rand() LIMIT N
search⚠️⚠️⚠️⚠️Approximated as LIKE %term%; no column-aware expansion
rangeClickHouse: arrayJoin(range()); Postgres: generate_series()
renderNo-op; chart type stored as hint only
serializeTreated as extend
printSELECT without FROM
consumeWraps as subquery + LIMIT 0
invokeNo SQL equivalent for plugins
evaluateNo SQL equivalent for plugins
nulls first/lastExtra ORDER BY item injected
select (KQL alias)Mapped to project