Coalesce

We can coalesce values with an ?? operator. Coalescing takes either the first value or, if that value is null, the second value.

PRQL

  1. from orders
  2. derive amount ?? 0

SQL

  1. SELECT
  2. *,
  3. COALESCE(amount, 0)
  4. FROM
  5. orders