SQL 문제 18 - Customer Who Visited but Did Not Make Any Transactions LeetCode 1581


SQL 문제 18 - Customer Who Visited but Did Not Make Any Transactions LeetCode 1581

SQL 문제 18 - Customer Who Visited but Did Not Make Any Transactions LeetCode 1581 Customer Who Visited but Did Not Make Any Transactions 풀이 SELECT CUSTOMER_ID , COUNT(VISIT_ID) COUNT_NO_TRANS FROM VISITS WHERE VISIT_ID NOT IN (SELECT VISIT_ID FROM TRANSACTIONS) GROUP BY CUSTOMER_ID; - transaction_id가 없을 경우, 2번 이상 방문했을 경우이므로, Visits 테이블에서 Transactions 테이블의 visit_id를 제외한 나머지를 카운트 하면 된다. * 출처 Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get ...


#CustomerWhoVisitedbutDidNotMakeAnyTransactions_LeetCode1581 #SQL #SQL_CustomerWhoVisitedbutDidNotMakeAnyTransactions #SQL_CustomerWhoVisitedbutDidNotMakeAnyTransactions_LeetCode1581 #SQL_LeetCode1581

원문링크 : SQL 문제 18 - Customer Who Visited but Did Not Make Any Transactions LeetCode 1581