Who's Eligible for the New Checking Perk?
Northline Bank is launching a perk that applies only to checking accounts, and the branch needs the eligible list before the letters go out. Each letter is addressed by city, so the city has to come back beside the name.
Every customer holds exactly one account type in this dataset, recorded as text on their row, so nothing has to be combined or counted — the only decision is which rows belong on the list and which columns the branch actually needs to see.
customers — one row per account holder. account_type is checking or savings. city is the branch city.
| id | name | account_type | city |
|---|---|---|---|
| 1 | Farah Idris | checking | Chicago |
| 2 | Grant Boyle | savings | Miami |
| 3 | Hana Suzuki | checking | Chicago |
| 4 | Ibrahim Njoku | savings | Miami |
| 5 | Jade Wu | checking | Seattle |
The table already exists in the database — there is nothing to create or load.
Task: Write a query returning two columns, name and city, for every customer holding a checking account. Rows come back in alphabetical order of name.
Example output — shape only, on invented customers.
| name | city |
|---|---|
| Bruno Salas | Tulsa |
| Nadia Okonkwo | Fresno |
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in