Skip to content

Commit 080c025

Browse files
authoredSep 14, 2020
Create 1581-customer-who-visited-but-did-not-make-any-transactions.sql
1 parent 7d247fe commit 080c025

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Write your MySQL query statement below
2+
SELECT customer_id, COUNT(*) as count_no_trans
3+
FROM Visits
4+
WHERE visit_id NOT IN (SELECT DISTINCT visit_id FROM Transactions)
5+
GROUP BY customer_id;

0 commit comments

Comments
 (0)
Please sign in to comment.