Write a SQL query name of students who get higher than 75 marks using ORDER BY, SUBSTRING(), LENGTH(). This is the solution of HackerRank's Higher Than 75 Marks SQL problem.
Table name: STATION
Table Structure:
Fileds | Type |
ID | NUMBER |
NAME | VARCHAR |
MARKS | NUMBER |
SQL Query:
SELECT name FROM STUDENTS
WHERE marks > 75
ORDER BY SUBSTRING(name, LENGTH(name)-2, 3) ASC,
id ASC