Remove completely blank rows, keep partly empty ones (clinic)
A sign-in sheet has spacer rows where every cell is empty. Remove those, but keep real rows that just lack a phone or city.
- Level
- intermediate
- Time
- ~7 min
- Task
- Build the query
- Access
- Free — no account needed
Loading the practice workspace…
About this exercise
What you'll practise
Test a whole row for blankness, treating null and empty text alike.
St. Marrow Clinic (fictional) types up its paper visitor sign-in sheets, including the empty spacer lines.
Steps
- Remove rows where every field is null or empty text.
- Keep rows that have at least one value, even if other fields are empty.
- Keep all columns.
Your result must
- No completely blank rows
- Rows with a missing phone or city are kept
- All columns
Input
- SignIns (table)
- Name: text (nullable)
- Phone: text
- City: text (nullable)
- Visits: number (nullable)
Expected output columns
Name (text (some rows null)), Phone (text), City (text), Visits (number)
| Name | Phone | City | Visits |
|---|---|---|---|
| null | Millbrook | 8 | |
| null | 0780675226 | Westmere | 9 |
| Esi Okafor | 0883327861 | Lakeport | 9 |