Find merchants with no card transaction in March 2026 (2026-03-01 to 2026-03-31). Note: some transactions have a NULL merchant_id (unmatched terminals). Return merchant_id and merchant_name. Order by merchant_id.
| Column | Type |
|---|---|
| merchant_id | INTEGER |
| merchant_name | TEXT |
| city | TEXT |
| merchant_id | merchant_name | city |
|---|---|---|
| 1 | Cafe Brew | Mumbai |
| 2 | Book Nook | Delhi |
| 3 | Fuel Stop | Pune |
| 4 | Gadget Hub | Jaipur |
| 5 | Shoe Box | Delhi |
| Column | Type |
|---|---|
| txn_id | INTEGER |
| merchant_id | INTEGER |
| txn_date | DATE |
| amount | REAL |
| txn_id | merchant_id | txn_date | amount |
|---|---|---|---|
| 1 | 1 | 2026-03-02 | 250 |
| 2 | 2 | 2026-02-27 | 900 |
| 3 | 3 | 2026-03-31 | 1500 |
| 4 | 2 | 2026-04-01 | 300 |
| 5 | 5 | 2026-03-15 | 1200 |
| merchant_id | merchant_name |
|---|---|
| 2 | Book Nook |
| 4 | Gadget Hub |
Solve it in the live editor on this page — run on sample data, then submit against hidden tests.
‹ Clean Category Labels · Effective Roles Through Role Inheritance ›
{{ totalCount }} questions in the style asked at Amazon, Microsoft, Google, Meta, Flipkart and more — {{ hardPct }}% Hard. Write SQL in a real database engine in your browser, run it on sample data, then evaluate against hidden tests.
Company tags show where this type of question is commonly reported in interviews. Questions, data and solutions are written by TechTown.
{{ cur.statement }}
No submissions yet. Press Evaluate to submit your query.
{{ solutionSql }}
{{ out.error }}
You have solved your 3 free questions — nice work! Log in (free) to unlock all 150 questions, keep your streak and appear on the leaderboard.