728x90
https://www.hackerrank.com/challenges/the-report/problem?isFullScreen=true
select if(grades.grade>=8,students.name,"NULL"), grades.grade, students.marks
from students
join grades on students.marks between grades.min_mark and grades.max_mark
order by grades.grade desc, students.name asc, students.marks asc;
728x90
'데이터 분석 > [SQL] 기초' 카테고리의 다른 글
[SQL] NULL 값 0 치환하기 (IFNULL) (0) | 2023.10.17 |
---|---|
[SQL] 데이터 삭제하기(drop/delete/truncate) (0) | 2023.07.04 |
[HackerRank] Average population of each continent (0) | 2022.03.30 |
표준 SQL 문법 (0) | 2022.02.14 |
[SQL] 셀프 조인(Self Join) (0) | 2021.10.02 |