We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- SQL
- Basic Select
- Higher Than 75 Marks
- Discussions
Higher Than 75 Marks
Higher Than 75 Marks
Sort by
recency
|
2205 Discussions
|
Please Login in order to post a comment
select name from students where marks>75 order by right(name,3) case when right(name,3)=right(name,3) then order by ID end name;
Solution SELECT NAME FROM STUDENTS WHERE MARKS>75 ORDER BY RIGHT(NAME,3),ID;
MSSQL
SELECT NAME FROM STUDENTS WHERE MARKS > 75 ORDER BY RIGHT(NAME, 3) ASC, ID ASC
select name from students where marks > 75 order by substring(name,-3), id asc;
select name from students where marks > 75 order by substr(name, length(name) - 2) asc;