Skip to topics
tee / insights
LEARNING / SQL

DQL / Data Query Language

SQL DQL: Queries and analysis

Build query results with SELECT. Follow inputs, filters, aggregation, window calculations, expressions and output to understand where each clause and function fits.

Topics in this category

Choose and combine inputs

FROM selects an input; JOIN combines tables. WITH and subqueries organize intermediate results. Array expansion also belongs here.

Filter rows and groups

WHERE, HAVING and QUALIFY filter at different stages. Read them with comparisons, logical operators and NULL handling.

Group and aggregate rows

GROUP BY defines groups; COUNT and SUM calculate counts and totals. Distinguish query-level clauses from modifiers inside aggregate calls.

Rank and compare while keeping rows

OVER defines a window; PARTITION BY divides it into groups. Read ranking, neighboring-row comparisons and running totals with their frame specifications.

Transform values

Build expressions with text, numbers, dates, conditions and conversions. Use the function index below to inspect arguments and return values.

Combine and order results

Combine result sets with UNION and other set operators, sort with ORDER BY and limit row counts with LIMIT. Compare set operations with JOIN.

From function categories to individual functions

Choose a category to filter the function map, or a function name to open its details. String and date functions also work in expressions such as UPDATE SET, beyond SELECT.