[HackerRank] The Report

데이터 분석/[SQL] 기초

[HackerRank] The Report

INCHELIN 2022. 3. 31. 16:48
728x90

https://www.hackerrank.com/challenges/the-report/problem?isFullScreen=true 

 

The Report | HackerRank

Write a query to generate a report containing three columns: Name, Grade and Mark.

www.hackerrank.com

 

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