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