반응형 코딩테스트91 [프로그래머스 - ORACLE] 경기도에 위치한 식품창고 목록 출력하기 CREATE 문 CREATE TABLE FOOD_WAREHOUSE ( WAREHOUSE_IDVARCHAR(10)NOT NULL, WAREHOUSE_NAMEVARCHAR(20)NOT NULL, ADDRESSVARCHAR(100)NULL, TLNOVARCHAR(20)NULL, FREEZER_YNVARCHAR(1)NULL ) 내 풀이 SELECT WAREHOUSE_ID, WAREHOUSE_NAME, ADDRESS, NVL(FREEZER_YN, 'N') AS FREEZER_YN FROM FOOD_WAREHOUSE WHERE ADDRESS LIKE '경기도%' ORDER BY WAREHOUSE_ID ASC; 2023. 3. 21. [프로그래머스 - ORACLE] 있었는데요 없었습니다 CREATE 문 CREATE TABLE ANIMAL_INS ( ANIMAL_IDVARCHAR2(100)NOT NULL PRIMARY KEY, ANIMAL_TYPEVARCHAR2(100)NOT NULL, DATETIMETIMESTAMPNOT NULL, INTAKE_CONDITIONVARCHAR2(100)NOT NULL, NAMEVARCHAR2(100)NULL, SEX_UPON_INTAKEVARCHAR2(100)NOT NULL ) CREATE TABLE ANIMAL_OUTS ( ANIMAL_IDVARCHAR2(100)NOT NULL , ANIMAL_TYPEVARCHAR2(100)NOT NULL, DATETIMETIMESTAMPNOT NULL, NAMEVARCHAR2(100)NULL, SEX_UPON_OUTC.. 2023. 3. 21. [프로그래머스 - ORACLE] 없어진 기록 찾기 CREATE 문 CREATE TABLE ANIMAL_INS ( ANIMAL_IDVARCHAR2(100)NOT NULL PRIMARY KEY, ANIMAL_TYPEVARCHAR2(100)NOT NULL, DATETIMETIMESTAMPNOT NULL, INTAKE_CONDITIONVARCHAR2(100)NOT NULL, NAMEVARCHAR2(100)NULL, SEX_UPON_INTAKEVARCHAR2(100)NOT NULL ) CREATE TABLE ANIMAL_OUTS ( ANIMAL_IDVARCHAR2(100)NOT NULL , ANIMAL_TYPEVARCHAR2(100)NOT NULL, DATETIMETIMESTAMPNOT NULL, NAMEVARCHAR2(100)NULL, SEX_UPON_OUTC.. 2023. 3. 21. [프로그래머스 - ORACLE] 조건에 맞는 도서와 저자 리스트 출력하기 CREATE 문 CREATE TABLE BOOK ( BOOK_IDNUMBERNOT NULL, CATEGORYVARCHAR(10)NOT NULL, AUTHOR_IDNUMBERNOT NULL, PRICENUMBERNOT NULL, PUBLISHED_DATEDATENOT NULL ) CREATE TABLE AUTHOR ( AUTHOR_IDNUMBER NOT NULL, AUTHOR_NAMEVARCHAR(20) NOT NULL ) 내 풀이 SELECT B.BOOK_ID, A.AUTHOR_NAME, TO_CHAR(B.PUBLISHED_DATE , 'YYYY-MM-DD') AS PUBLISHED_DATE FROM BOOK B INNER JOIN AUTHOR A ON B.AUTHOR_ID = A.AUTHOR_ID AN.. 2023. 3. 21. [프로그래머스 - ORACLE] 나이 정보가 없는 회원 수 구하기 CREATE 문 CREATE TABLE USER_INFO ( USER_IDNUMBERNOT NULL, GENDERNUMBERNULL, AGENUMBERNULL, JOINEDDATENOT NULL ) 내 풀이 SELECT COUNT(USER_ID) AS USERS FROM USER_INFO WHERE AGE IS NULL; 2023. 3. 21. [프로그래머스 - ORACLE] 조건에 맞는 회원수 구하기 CREATE 문 CREATE TABLE USER_INFO ( USER_IDNUMBERNOT NULL, GENDERNUMBERNULL, AGENUMBERNULL, JOINEDDATENOT NULL ) 내 풀이 SELECT COUNT(USER_ID) FROM USER_INFO WHERE TO_CHAR(JOINED , 'YYYY') = '2021' AND AGE BETWEEN 20 AND 29; 2023. 3. 21. 이전 1 ··· 10 11 12 13 14 15 16 다음 반응형