db.l3.ai

Play

lessons

upsert-drills

what-changed-in-19

editor

engine: not started

results

Run a query to see rows here.

check

Two counts in one query

CASE WHEN turns a condition into a value. count() skips NULL, so a CASE with no ELSE counts only the rows that match.

task

In one query, count the bookings of facility 1 and of facility 3, as two columns.

hints