SQL 강의를 다 듣고 주어진 문제 풀이를 하였다.
https://school.programmers.co.kr/learn/courses/30/lessons/59036
SELECT ANIMAL_ID, NAME FROM ANIMAL_INS
WHERE INTAKE_CONDITION = 'Sick'
https://school.programmers.co.kr/learn/courses/30/lessons/59403
SELECT CAR_ID, CAR_TYPE, DAILY_FEE, OPTIONS FROM CAR_RENTAL_COMPANY_CAR
https://school.programmers.co.kr/learn/courses/30/lessons/59407
SELECT ANIMAL_ID FROM ANIMAL_INS
WHERE NAME IS NOT NULL
https://school.programmers.co.kr/learn/courses/30/lessons/59405
SELECT NAME FROM ANIMAL_INS
ORDER BY DATETIME
LIMIT 1
https://school.programmers.co.kr/learn/courses/30/lessons/59404
SELECT ANIMAL_ID, NAME, DATETIME FROM ANIMAL_INS
ORDER BY NAME, DATETIME DESC
https://school.programmers.co.kr/learn/courses/30/lessons/59037
SELECT ANIMAL_ID, NAME FROM ANIMAL_INS
WHERE INTAKE_CONDITION != 'Aged'
ORDER BY ANIMAL_ID
https://school.programmers.co.kr/learn/courses/30/lessons/59035
SELECT NAME, DATETIME FROM ANIMAL_INS
ORDER BY ANIMAL_ID DESC
https://school.programmers.co.kr/learn/courses/30/lessons/131112
SELECT FACTORY_ID, FACTORY_NAME, ADDRESS FROM FOOD_FACTORY
WHERE ADDRESS LIKE '강원도%'
ORDER BY FACTORY_ID
https://school.programmers.co.kr/learn/courses/30/lessons/131528
SELECT COUNT(*) AS USERS FROM USER_INFO
WHERE AGE IS NULL
https://school.programmers.co.kr/learn/courses/30/lessons/131114
SELECT WAREHOUSE_ID,
WAREHOUSE_NAME,
ADDRESS,
if ( isnull(FREEZER_YN), 'N', FREEZER_YN) AS FREEZER_YN
FROM FOOD_WAREHOUSE
WHERE ADDRESS LIKE '경기도%'
ORDER BY WAREHOUSE_ID
https://school.programmers.co.kr/learn/courses/30/lessons/131535
SELECT COUNT(*) AS USERS FROM USER_INFO
WHERE SUBSTRING_INDEX(JOINED, 1, 4) = 2021 and AGE BETWEEN 20 and 29
https://school.programmers.co.kr/learn/courses/30/lessons/59039
SELECT ANIMAL_ID FROM ANIMAL_INS
WHERE NAME IS NUll
https://school.programmers.co.kr/learn/courses/30/lessons/131697
SELECT MAX(PRICE) as MAX_PRICE FROM PRODUCT
https://school.programmers.co.kr/learn/courses/30/lessons/132203
SELECT DR_NAME, DR_ID, MCDP_CD, SUBSTRING_INDEX(HIRE_YMD, 1, 10) FROM DOCTOR
WHERE MCDP_CD = 'CS' OR MCDP_CD = 'GS'
ORDER BY HIRE_YMD DESC
https://school.programmers.co.kr/learn/courses/30/lessons/132201
SELECT PT_NAME,
PT_NO,
GEND_CD,
AGE,
if ( isnull(TLNO), 'NONE', TLNO) AS TLNO FROM PATIENT
WHERE AGE <= 12 and GEND_CD = 'W'
ORDER BY AGE DESC, PT_NAME
https://school.programmers.co.kr/learn/courses/30/lessons/133024
SELECT FLAVOR FROM FIRST_HALF
ORDER BY TOTAL_ORDER DESC, SHIPMENT_ID
https://school.programmers.co.kr/learn/courses/30/lessons/59034
SELECT * FROM ANIMAL_INS
ORDER BY ANIMAL_ID
'개발 ━━━━━ > TIL' 카테고리의 다른 글
[TIL] Java 자료형과 Git 협업 (fork vs clone) (0) | 2023.08.15 |
---|---|
[TIL] 미니 프로젝트 3일차 -완- (0) | 2023.08.11 |
[TIL] 미니 프로젝트 2일차 (0) | 2023.08.10 |
[TIL] 미니 프로젝트 1일차 (0) | 2023.08.09 |
[TIL] Programmers SQL 문제 풀이 (0) | 2023.08.07 |