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
- 나는 리뷰어다
- Recsys-KR
- 3줄 논문
- 엘리스
- 스택
- TEAM EDA
- hackerrank
- Segmentation
- 튜토리얼
- DilatedNet
- 나는리뷰어다
- 입문
- eda
- 추천시스템
- DFS
- 파이썬
- Object Detection
- 한빛미디어
- 코딩테스트
- Image Segmentation
- 프로그래머스
- MySQL
- pytorch
- 협업필터링
- Machine Learning Advanced
- TEAM-EDA
- 큐
- Python
- 알고리즘
- Semantic Segmentation
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 |