Practice · Art & Cinema · Medium
Return the name and domain of cultural figures who are still living (death_year IS NULL), name A→Z.
Runs in your browser. No signup needed.
cultural_figures(name, domain, birth_year, death_year). A NULL death_year means still living.
SELECT name, domain
FROM cultural_figures
WHERE death_year IS NULL
ORDER BY name;
The reference solution is checked automatically when you run your query on the practice page — results are compared row by row, and order matters for this one.
Handling NULLs correctly (IS NULL, not = NULL) is one of the most common real-world SQL bugs — three-valued logic trips up even senior analysts. (SQLite docs)