Chapter 26

Advanced SELECT Statements

Abstract

This is a collection of common SQL programming idioms for queries. We show how correlated subqueries are used and discuss the ANSI/ISO Standard infixed join operators. The chapter covers replacing missing values in columns and rows. There is a detailed Stable Marriages solution.

Keywords

“Data Smear”

Aggregate functions

Algol

Best-fit greedy algorithm

Block structured languages

Box Packing

Combinatorial explosions

Comparisons

Correlation

CROSS JOIN

CUBE

Daniel Morgan

DEFAULT

Derived table

Donald E. Knuth

Duplicate rows

Dwain Camps

Edsger Dijkstra

Frédéric Brouard

FULL OUTER JOIN

GOTO statement

Greedy algorithm

GROUPING < column name >

GROUPING SET

Gusfierld Dan Irving

INNER JOIN

Interpolation ...

Get Joe Celko's SQL for Smarties, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.