본문 바로가기
DB/SQL

Higher Than 75 Marks

by _S0_H2_ 2020. 6. 19.
728x90
반응형

문제 : Query the Name of any student in STUDENTS who scored higher than  Marks. Order your output by the last three characters of each name. If two or more students both have names ending in the same last three characters (i.e.: Bobby, Robby, etc.), secondary sort them by ascending ID.

 

SELECT Name
FROM STUDENTS
WHERE Marks > 75
ORDER BY RIGHT(NAME, 3), ID ASC;
Stuart Kristeen Christene Amina Aamina Priya Heraldo Scarlet Julia Salma Britney Priyanka Samantha Vivek Belvet Devil Evil
728x90
반응형

'DB > SQL' 카테고리의 다른 글

Employee Salaries  (0) 2020.06.19
Employee Names  (0) 2020.06.19
HackerRank_16. Weather Observation Station 10  (0) 2020.06.12
HackerRank_15. Weather Observation Station 9  (0) 2020.06.11
HackerRank_14. Weather Observation Station 8  (0) 2020.06.11