IS NULL filter — the unconverted-leads worklist pattern
Give me every lead in `revops_leads` where `account_id IS NULL` — these are the ones we haven't converted to an account yet, so they're still at the top of the funnel. Return `lead_id`, `full_name`, and `source`. Order by created_date ascending so the oldest unconverted leads are first — those are the SDR follow-up targets.
| Column | Type | Key |
|---|---|---|
| lead_id | INT | PK |
| full_name | TEXT | |
| TEXT | ||
| company_name | TEXT | |
| source | TEXT | |
| status | TEXT | |
| account_id | INT | FK → revops_accounts |
| created_date | TEXT |
Each hint you reveal reduces the XP you can earn. Try the query first.
`WHERE account_id IS NULL` — critical that you use `IS NULL`, not `= NULL`. Equality comparisons against NULL always yield NULL (neither true nor false), so `WHERE x = NULL` returns zero rows.
Order by `created_date ASC`. Oldest unconverted leads at the top.
You should see 6 leads. The other 4 leads in the seed have already been converted — they have a non-null account_id.