[SQL] 프로그래머스 문제 풀기 lv1
·
Study
1. 가장 큰 물고기 10마리 구하기select ID, LENGTH from FISH_INFO where LENGTH is not null order by LENGTH DESC , ID ASC limit 10- is not null- order by (조건 1) , (조건 2)- limit은 가장 끝에 2. 한 해에 잡은 물고기 구하기select count(ID) as fish_count from fish_info where year(time) = 2021;- as 로 칼럼 이름 다르게 저장하는 것- where 절 쓰기- 내장함수 year() 3. 잡은 물고기 중 가장 큰 물고기의 길이 구하기select concat(max(length),'cm') as max_length from fish_info- 내..