[프로그래머스 SQL 고득점 Kit] SELECT: 강원도에 위치한 생산공장 목록 출력하기
문제 정답 SELECT FACTORY_ID, FACTORY_NAME, ADDRESS FROM FOOD_FACTORY WHERE ADDRESS LIKE '%강원도%' ORDER BY FACTORY_ID
문제 정답 SELECT FACTORY_ID, FACTORY_NAME, ADDRESS FROM FOOD_FACTORY WHERE ADDRESS LIKE '%강원도%' ORDER BY FACTORY_ID
문제 정답 SELECT * FROM ANIMAL_INS ORDER BY ANIMAL_ID
문제 정답 SELECT USER_ID, PRODUCT_ID FROM ONLINE_SALE GROUP BY USER_ID, PRODUCT_ID HAVING COUNT(*) >= 2 ORDER BY USER_ID ASC, PRODUCT_ID DESC
문제 정답 (SELECT DATE_FORMAT(SALES_DATE, "%Y-%m-%d") AS SALES_DATE, PRODUCT_ID, USER_ID, SALES_AMOUNT FROM ONLINE_SALE AS A WHERE MONTH(SALES_DATE) = 03 UNION SELECT DATE_FORMAT(SALES_DATE, "%Y-%m-%d") AS SALES_DATE, PRODUCT_ID, NULL AS USER_ID, SALES_AMOUNT FROM OFFLINE_SALE AS B WHERE MONTH(SALES_DATE) = 03 ) ORDER BY SALES_DATE, PRODUCT_ID, USER_ID
문제 정답 SELECT NAME, DATETIME FROM ANIMAL_INS ORDER BY ANIMAL_ID DESC
문제 정답 SELECT ANIMAL_ID, NAME FROM ANIMAL_INS WHERE INTAKE_CONDITION = 'Sick' ORDER BY ANIMAL_ID
문제 정답 SELECT ANIMAL_ID, NAME FROM ANIMAL_INS WHERE INTAKE_CONDITION != 'Aged' ORDER BY ANIMAL_ID ASC
문제 정답 SELECT ANIMAL_ID, NAME FROM ANIMAL_INS ORDER BY ANIMAL_ID
문제 정답 SELECT ANIMAL_ID, NAME, DATETIME FROM ANIMAL_INS ORDER BY NAME ASC, DATETIME DESC
문제 정답 SELECT NAME FROM ANIMAL_INS ORDER BY DATETIME LIMIT 1