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