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
- 입문
- 3줄 논문
- eda
- 큐
- TEAM-EDA
- Python
- 추천시스템
- Segmentation
- 나는리뷰어다
- MySQL
- TEAM EDA
- 프로그래머스
- pytorch
- Object Detection
- 스택
- Image Segmentation
- Recsys-KR
- 한빛미디어
- DFS
- 알고리즘
- 파이썬
- hackerrank
- DilatedNet
- 튜토리얼
- 코딩테스트
- Semantic Segmentation
- 엘리스
- 협업필터링
- 나는 리뷰어다
- Machine Learning Advanced
Archives
- Today
- Total
TEAM EDA
[HackerRank] Basic Select : Higher Than 75 Marks 본문
Query the Name of any student in STUDENTS who scored higher than 75 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.
Input Format
The STUDENTS table is described as follows: The Name column only contains uppercase (A-Z) and lowercase (a-z) letters.
Sample Input
Sample Output
Ashley
Julia
Belvet
Explanation
Only Ashley, Julia, and Belvet have Marks > 75. If you look at the last three characters of each of their names, there are no duplicates and 'ley' < 'lia' < 'vet'.
풀이
SELECT NAME FROM STUDENTS
WHERE Marks > 75
ORDER BY RIGHT(Name, 3) ASC, ID ASC;
'EDA Study > SQL' 카테고리의 다른 글
[HackerRank] Basic Select : Employee Salaries (0) | 2021.02.07 |
---|---|
[HackerRank] Basic Select : Employee Names (0) | 2021.02.07 |
[HackerRank] Basic Select : Weather Observation Station 1~12 (0) | 2021.02.07 |
[HackerRank] Basic Select : Japanese Cities' Names (0) | 2021.02.07 |
[HackerRank] Basic Select : Japanese Cities' Attributes (0) | 2021.02.07 |