Apache Pinot provides a SQL interface for querying, which uses the Calcite SQL parser to parse queries and the MYSQL_ANSI dialect. The multi-stage query engine in Pinot supports inner join, left-outer, semi-join, and nested queries out of the box.

Several different types of functions are supported, such as Aggeregation Functions, Transformation Functions, and query operators for querying JSON data.

For the complete list of supported functions and description of query syntax, see Querying Pinot.

Sample Queries

Selection

//default to limit 10
SELECT * 
FROM myTable 

SELECT * 
FROM myTable 
LIMIT 100
SELECT "date", "timestamp"
FROM myTable 

Aggregation

SELECT COUNT(*), MAX(foo), SUM(bar) 
FROM myTable

Filtering

SELECT COUNT(*) 
FROM myTable
  WHERE foo = 'foo'
  AND bar BETWEEN 1 AND 20
  OR (baz < 42 AND quux IN ('hello', 'goodbye') AND quuux NOT IN (42, 69))

Ordering on Selection

SELECT foo, bar 
FROM myTable
  WHERE baz > 20
  ORDER BY bar DESC
  LIMIT 100

StarTree Cloud supports a comprehensive set of functions for data manipulation and analysis. For a complete reference, see the Apache Pinot Function Documentation.