SQL
All Top 50 SQL Interview Questions#12
Find Unmatched Records with LEFT JOIN Anti-Pattern in SQL
EasyCrackNonTechInterview Question #12
Asked at CrackNonTechGiven `candidates` (candidate_id, name, email) and `offers` (offer_id, candidate_id, company_name), write a query to find all candidates who have NOT yet received any job offers.
Input Table: candidates & offers
3 rows preview| candidate_id | name | offer_id | company_name |
|---|---|---|---|
| 1 | Sachin Kumar | 901 | PwC |
| 2 | Shreya Aggarwal | 902 | HPE |
| 3 | Vikram Malhotra | NULL | NULL |
Expected Output Structure1 rows
| candidate_id | name | |
|---|---|---|
| 3 | Vikram Malhotra | vikram@example.com |
Interview Context
Asked frequently in data analyst and business analyst technical rounds. Focus on clean filtering, optimal indexing usage, and unambiguous column selection.
PostgreSQL 15
Ready to execute
Click "Run Query" or press Ctrl + Enter to test your query.
Output will be verified against the test dataset.