[프로그래머스 - ORACLE] 저자 별 카테고리 별 매출액 집계하기
CREATE 문 CREATE TABLE BOOK ( BOOK_IDNUMBER NOT NULL, CATEGORYVARCHAR(10)NOT NULL, AUTHOR_IDNUMBERNOT NULL, PRICENUMBERNOT NULL, PUBLISHED_DATEDATENOT NULL ); CREATE TABLE AUTHOR( AUTHOR_IDNUMBERNOT NULL, AUTHOR_NAMEVARCHAR(20)NOT NULL ); CREATE TABLE BOOK_SALES ( BOOK_IDNUMBERNOT NULL, SALES_DATEDATENOT NULL, SALESNUMBERNOT NULL ); 내 풀이 SELECT A.AUTHOR_ID, A.AUTHOR_NAME, B.CATEGORY, SUM(S.SALES ..
2023. 3. 24.
[프로그래머스 - ORACLE] 취소되지 않은 진료 예약 조회하기
CREATE 문 CREATE TABLE PATIENT ( PT_NOVARCHAR(30)NOT NULL, PT_NAMEVARCHAR(30)NOT NULL, GEND_CDVARCHAR(30)NOT NULL, AGENUMBERNOT NULL, TLNOVARCHAR(30)NULL ) CREATE TABLE DOCTOR ( DR_NAMEVARCHAR(30)NOT NULL, DR_IDVARCHAR(30)NOT NULL, LCNS_NOVARCHAR(30)NOT NULL, HIRE_YMDDATENOT NULL, MCDP_CDVARCHAR(30)NULL, TLNOVARCHAR(30)NULL ) CREATE TABLE APPOINTMENT ( APNT_YMDTIMESTAMPNOT NULL, APNT_NOINTEGERNOT..
2023. 3. 23.