Excel AutoFilter vs SQL WHERE: Filter Any Table in 30 Seconds
Every dropdown filter you click in Excel translates cleanly into SQL WHERE, AND, OR, IN, BETWEEN, and IS NULL.
By Victor Wachira · Founder, Sumwise · 4 min read
Checkboxes become IN (...)
Checking Austin and Denver in an Excel column filter is identical to WHERE city IN ('Austin', 'Denver'). Adding a filter on a second column is simply AND amount >= 50.
Filtering blanks: never write = NULL
In Excel you check (Blanks). In SQL, NULL means unknown, so = NULL never matches anything — always write WHERE email IS NULL or WHERE email IS NOT NULL.
Put this into practice in 4 minutes
Try real interactive Excel, Google Sheets, and SQL exercises — every core lesson is free to study.
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.