[프로그래머스 - ORACLE] 흉부외과 또는 일반외과 의사 목록 출력하기
CREATE 문 CREATE TABLE DOCTOR ( DR_NAMEVARCHAR(20)NOT NULL, DR_IDVARCHAR(10)NOT NULL, LCNS_NOVARCHAR(30)NOT NULL, HIRE_YMDDATENOT NULL, MCDP_CDVARCHAR(6)NULL, TLNOVARCHAR(50)NULL ); 내 풀이 SELECT DR_NAME, DR_ID, MCDP_CD, TO_CHAR(HIRE_YMD , 'YYYY-MM-DD') AS HIRE_YMD FROM DOCTOR WHERE MCDP_CD IN ('CS' , 'GS') ORDER BY HIRE_YMD DESC , DR_NAME ASC;
2023. 3. 20.
[프로그래머스 - ORACLE] 오프라인/온라인 판매 데이터 통합하기
CREATE 문 CREATE TABLE ONLINE_SALE ( ONLINE_SALE_IDNUMBERNOT NULL, USER_IDNUMBERNOT NULL, PRODUCT_IDNUMBERNOT NULL, SALES_AMOUNTNUMBERNOT NULL, SALES_DATEDATENOT NULL ); CREATE TABLE OFFLINE_SALE ( OFFLINE_SALE_IDNUMBERNOT NULL, PRODUCT_IDNUMBERNOT NULL, SALES_AMOUNTNUMBERNOT NULL, SALES_DATEDATENOT NULL ); 내 풀이 SELECT SALES_DATE , PRODUCT_ID, USER_ID, SALES_AMOUNT FROM( SELECT TO_CHAR(SALES_DATE..
2023. 3. 20.