Created
September 30, 2020 14:10
-
-
Save Justus-coded/716dc211c0561021a30660a6efa01a43 to your computer and use it in GitHub Desktop.
Hackerrank SQL Challenge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Query the Name of any student in STUDENTS who scored higher than 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. | |
*/ | |
SELECT Name | |
FROM STUDENTS | |
WHERE Marks > 75 | |
ORDER BY RIGHT(Name, 3) , ID ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment