Live SQLite 3.54 Sandbox
SQL COALESCE (Handling NULLs) (with live sandbox)
COALESCE returns the first non-NULL value in a list — the cleanest way to replace NULLs with defaults like 0 or "Unknown".
Syntax
SELECT full_name, COALESCE(email, 'missing@example.com') AS clean_email FROM customers;Return full_name and COALESCE(tier, 'Standard') AS member_tier from customers.
SQLite 3.50 SandboxCtrl/Cmd + Enter to Run (unlimited & ungraded)
Practise COALESCE (Handling NULLs) in our free SQL track
Same streak & XP across Excel, Google Sheets, and SQL.
Free 1-Page Excel, Google Sheets & SQL Interview Cheat Sheet
The 25 formulas, keyboard shortcuts, and SQL patterns tested most in analyst interviews — emailed instantly, zero spam.