728x90
❓ Question
https://www.hackerrank.com/challenges/more-than-75-marks
Higher Than 75 Marks | HackerRank
Query the names of students scoring higher than 75 Marks. Sort the output by the LAST three characters of each name.
www.hackerrank.com


❗ Answer
SELECT name
FROM students
WHERE marks > 75
ORDER BY RIGHT(name,3), id;
📌 Discussion
- WHERE에 조건을 걸어주고 ORDER BY에서 이름의 오른쪽 세글자 순으로 정렬해줌
'SQL 문제풀이' 카테고리의 다른 글
| [해커랭크 SQL] Basic Select - Employee Salaries (0) | 2023.08.18 |
|---|---|
| [해커랭크 SQL] Basic Select - Employee Names (0) | 2023.08.18 |
| [해커랭크 SQL] Basic Select - Weather Observation Station 12 (0) | 2023.08.18 |
| [해커랭크 SQL] Basic Select - Weather Observation Station 11 (0) | 2023.08.18 |
| [해커랭크 SQL] Basic Select - Weather Observation Station 10 (1) | 2023.08.18 |