The Customer Who Visited but Did Not Make Any Transactions interview question focuses on finding "lost opportunities" in a retail or service environment. You are given a Visits table and a Transactions table. You need to find the IDs of customers who visited the store but have no corresponding entry in the transactions table, along with the count of such visits. This Customer Who Visited but Did Not Make Any Transactions coding problem is a classic example of identifying records in one table that are missing from another.
Tech companies like Google, Meta, and Adobe ask this to test basic knowledge of "Anti-Joins." It evaluates if you understand how to use LEFT JOIN with a WHERE ... IS NULL check, or if you prefer using NOT IN or NOT EXISTS. It’s a core skill for generating "exception reports" in business intelligence.
This follows the Database interview pattern of filtering by exclusion.
Visit Log:
Always default to LEFT JOIN or NOT EXISTS for exclusion problems. Avoid NOT IN unless you are certain the subquery will never return a NULL, as it is a common pitfall in production SQL.
| Title | Difficulty | Topics | LeetCode |
|---|---|---|---|
| Recyclable and Low Fat Products | Easy | Solve | |
| Combine Two Tables | Easy | Solve | |
| Find Customer Referee | Easy | Solve | |
| Average Selling Price | Easy | Solve | |
| Fix Names in a Table | Easy | Solve |