728x90

문제

https://www.hackerrank.com/challenges/more-than-75-marks/problem?isFullScreen=true

 

Higher Than 75 Marks | HackerRank

Query the names of students scoring higher than 75 Marks. Sort the output by the LAST three characters of each name.

www.hackerrank.com

 

 

 

 

 

 

 

 

풀이(MSSQL)

SELECT NAME 
  FROM STUDENTS 
 WHERE MARKS > 75
 ORDER BY RIGHT(NAME, 3), ID;

 

조건 1. 학생의 점수는 75점 이상

조건 2. 학생 조회 순서는 이름의 오른쪽 3개로 정렬

조건 3. 그 다음 정렬 순서는 ID

 

300x250