-- orders: raw JSON documents, no schema, no flatteningSELECT tier,
COUNT(DISTINCT o.id) AS orders,
SUM(i.qty * i.price) AS revenue
FROM orders AS o,
o.itemsAS i -- unnest, like a join-- a nested path that is often absentGROUP BY COALESCE(o.customer.tier, 'basic') AS tier
ORDER BY revenue DESC
PartiQL's extensions to SQL are easy to understand, treat nested data as first-class citizens, and
compose seamlessly with each other and SQL. Filter, join, and aggregate across structured,
semi-structured, and nested datasets.
Data storage independence
PartiQL separates the syntax and semantics of a query from the format of the data or the store being
accessed, giving unified query access across data stores — with or without a regular schema.
Open source
The syntax, semantics, embeddable reference interpreter, CLI, test framework, and tests are licensed
under Apache 2.0 — use, copy, and distribute your changes under the terms of your choice.
See it in action
Explore data from the PartiQL CLI
Query JSON and Ion documents interactively with the PartiQL REPL, or embed the reference
implementation in your own JVM or Rust application.