Skip to content

Glossary: SQL Basics

COALESCE

A function that returns the first of its arguments that isn't NULL. `COALESCE(SUM(i.quantity), 0)` gives 0 instead of NULL for a customer with no orders.

Where the book teaches it

Related terms

NULL