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 | 29 | 30 |
Tags
- 선형 모형
- 코딩공부
- 깃헙협업
- 버전충돌
- HTML
- window function
- leetcode
- programmers
- branch
- 클라우드컴퓨팅
- 온라인협업
- elastic net
- Git
- AWS
- coding
- full request
- CSS
- 교차 엔트로피
- early stopping
- 편향-분산 교환
- github
- mysql
- L2정규화
- hackerrank
- L1정규화
- conflict
- merge
- RLIKE
- PYTHON
- sql
Archives
- Today
- Total
Im between cherry
Hackerrank | MySQL | Higher Than 75 Marks 본문
Higher Than 75 Marks
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