#74. JOIN : 상품을 구매한 회원 비율 구하기 | 프로그래머스 | SQL 고득점 Kit
문제 입력 코드 1. SELECT YEAR, MONTH, COUNT(*) AS PUCHASED_USERS, ROUND((COUNT(*)/ ( SELECT COUNT(*) FROM USER_INFO WHERE YEAR(JOINED) = 2021 )), 1) AS PUCHASED_RATIO FROM ( SELECT DISTINCT YEAR(S.SALES_DATE) AS YEAR, MONTH(S.SALES_DATE) AS MONTH, U.USER_ID FROM ONLINE_SALE AS S JOIN USER_INFO AS U ON S.USER_ID = U.USER_ID AND YEAR(JOINED) = 2021 ) AS A GROUP BY YEAR, MONTH ORDER BY YEAR, MONTH; 2. SE..