SQL Reference
Apache Kylin relies on Apache Calcite to parse and optimize the SQL statements. As an OLAP engine, Kylin supports SELECT
statements, while doesn't support others like INSERT
, UPDATE
and DELETE
operations in SQL, so Kylin's SQL grammer is a subset of Apache Calcite. This page lists the SQL grammar, the functions and the basic data types that Kylin supports. You can also check Calcite SQL reference for more detailed info.
Grammar
QUERY SYNTAX SELECT STATEMENT EXPRESSION SUBQUERY JOIN INNER JOIN LEFT JOIN UNION UNION ALL
Function
COUNT COUNT(COLUMN) COUNT(*) COUNT_DISTINCT MAX MIN PERCENTILE SUM TOP_N WINDOW ROW_NUMBER AVG RANK DENSE_RANK FIRST_VALUE LAST_VALUE LAG LEAD NTILE CASE WHEN CAST SUSTRING COALESCE STDDEV_SUM INTERSECT_COUNT INTERSECT_VALUE