Queries

Queries#

A query retrieves data from a Querona virtual database with the SELECT statement and its clauses. This section describes the clauses and options Querona supports.

  • SELECT — the SELECT statement, its projection list and the GROUP BY, HAVING, ORDER BY, OVER and FOR clauses.

  • FROM — the table sources a query reads from, including joins.

  • Common Table Expressions (WITH) — non-recursive WITH clauses: named subqueries you reference like tables.

  • WHERE — filters rows with Predicates.

  • TOP — limits the number of rows returned.

  • Hints and OPTION clause — query hints and the OPTION clause.

  • Reading execution plans — how to read the execution plan of a federated query, and what the Remote Query operator tells you about push-down.

Beyond tables and views, the FROM clause can read external data directly through rowset functions such as OPENQUERY, OPENROWSET and OPENJSON.