[프로그래머스][MYSQL][Level 1][59404] 여러 기준으로 정렬하기
문제 링크
정답
1
2
3
SELECT ANIMAL_ID, NAME, DATETIME
FROM ANIMAL_INS
ORDER BY NAME ASC, DATETIME DESC
해설
1
ORDER BY column1 DESC, column2
This sorts everything by column1 (descending) first, and then by column2 (ascending, which is the default) whenever the column1 fields for two or more rows are equal.
참조
Success Notice: 수고하셨습니다.
Leave a comment