Search GimmeJob

Type at least 2 characters. Enter also searches by meaning.
GimmeJob
Sign in
Databases, SQL & BI · SQL · Chapter 17 / 17

SQL learning path

SQL query patterns reference

Common SQL problems grouped by the operation and result shape involved.

Filtering and result shape

SELECT determines the output columns; WHERE selects rows; ORDER BY defines result order. DISTINCT removes duplicate output rows, not necessarily duplicate business entities. NULL tests use IS NULL or IS NOT NULL rather than equality with NULL.

Relationships and result grain

INNER JOIN keeps matched row combinations; LEFT JOIN also retains unmatched rows from its left side. One-to-many joins can multiply rows and inflate aggregates. EXISTS and NOT EXISTS test whether related rows exist without adding their columns to the result.

Analytical queries

Window functions support latest-row-per-group, top-N-per-group, running totals and previous/next event comparisons while retaining detail rows. CTEs name intermediate results. A deterministic latest-row result needs an ordering rule that resolves ties.

Transactional writes

INSERT, UPDATE and DELETE change data. Transactions group changes for commit or rollback; constraints enforce rules such as keys, uniqueness and required values. The affected-row scope and concurrent transaction behavior are separate from whether a statement is syntactically valid.

Data-quality checks

Orphan rows, duplicate business keys, mismatched payment totals and differences between expected and actual sets are distinct query patterns. A zero-row result represents success only when the query describes invalid states in the intended data scope.

Detailed references

Source registry

3 chapter references · Under review
SQLBolt Interactive SQL Lessons

Practice-sequencing reference: short concept blocks followed immediately by hands-on SELECT, filtering, joins, aggregates, DML, and DDL exercises.

SQLBolt · interactive tutorial
Source ↗
SQL Syllabus (Curriculum)

Beginner-friendly coverage checklist and sequencing reference for core SQL syntax, querying, joins, DML, DDL, constraints, views, and security basics.

W3Schools · tutorial
Source ↗
PostgreSQL 18 Tutorial

Primary semantic reference for relational concepts, querying, joins, aggregates, updates, deletes, views, foreign keys, transactions, and window functions.

PostgreSQL Global Development Group · official documentation
Source ↗