[문제]
[MySQL]
SELECT v.customer_id
, COUNT(*) AS count_no_trans
FROM Visits AS v
LEFT JOIN Transactions AS t ON v.visit_id = t.visit_id
WHERE t.transaction_id IS NULL
GROUP BY v.customer_id
'SQL > LeetCode' 카테고리의 다른 글
| [LeetCode] 1633. Perentage of Users Attended a Contest (0) | 2025.02.20 |
|---|---|
| [LeetCode] 1587. Bank Account Summary II (0) | 2025.02.20 |
| [LeetCode] 1527. Patients With a Condition (0) | 2025.02.20 |
| [LeetCode] 1517. Find Users With Valid E-Mails (0) | 2025.02.20 |
| [LeetCode] 1484. Group Sold Products By The Date (0) | 2025.02.20 |
