Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- AWS
- 코딩공부
- programmers
- conflict
- L2정규화
- 온라인협업
- branch
- sql
- elastic net
- 깃헙협업
- L1정규화
- window function
- hackerrank
- 클라우드컴퓨팅
- 버전충돌
- 교차 엔트로피
- 선형 모형
- early stopping
- CSS
- coding
- leetcode
- github
- 편향-분산 교환
- PYTHON
- full request
- RLIKE
- Git
- merge
- mysql
- HTML
Archives
- Today
- Total
Im between cherry
Hackerrank | MySQL | Higher Than 75 Marks 본문
Higher 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
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.
- Solution
SELECT name
FROM students
WHERE marks > 75
ORDER BY RIGHT(name, 3) ASC, id ASC
SELECT name
FROM students
WHERE marks > 75
ORDER BY RIGHT(name, 3), ID ASC
SELECT Name
FROM Students
WHERE Marks > 75
ORDER BY right(Name,3), Id
'데이터분석 > practice_query' 카테고리의 다른 글
Hackerrank | MySQL | Employee Salaries (0) | 2020.08.28 |
---|---|
Hackerrank | MySQL | Employee Names (0) | 2020.08.28 |
Hackerrank | MySQL | Weather Observation Station 12 (0) | 2020.08.28 |
Hackerrank | MySQL | Weather Observation Station 11 (0) | 2020.08.28 |
Hackerrank | MySQL | Weather Observation Station 10 (0) | 2020.08.28 |
Comments