[프로그래머스 - ORACLE] 상품을 구매한 회원 비율 구하기
CREATE 문 CREATE TABLE USER_INFO ( USER_IDNUMBERNOT NULL, GENDERNUMBERNULL, AGENUMBERNULL, JOINEDDATENOT NULL ) CREATE TABLE ONLINE_SALE ( ONLINE_SALE_IDNUMBERNOT NULL, USER_IDNUMBERNOT NULL, PRODUCT_IDNUMBERNOT NULL, SALES_AMOUNTNUMBERNOT NULL, SALES_DATEDATENOT NULL ) 내 풀이 SELECT YEAR(O.SALES_DATE) AS YEAR, MONTH(O.SALES_DATE) AS MONTH, COUNT(DISTINCT(U.USER_ID)) AS PUCHASED_USERS, ROUND(COUNT(..
2023. 3. 22.