In a school database, there is a table named 'students' that contains student data including their names, IDs, and marks. The task is to identify students who have scored more than 75 marks and sort the result based on specific criteria.
CodeRankGPT is a tool powered by GPT-4 that quietly assists you during your coding interview, providing the solutions you need.
In real-time and absolutely undetectable 🥷
The SQL query uses the 'select' statement to retrieve the 'name' field from the 'students' table. It applies a 'where' clause to filter out students who scored more than 75 marks. The 'order by' clause is used to sort the result first by the last three characters of the students' names (using the 'right' function) and then by their IDs in ascending order.
select name from students where marks > 75 order by right(name,3),id asc;
If you have a HackerRank coding test coming up, you can use CodeRankGPT to your advantage. It will assist you during your interview and help ensure you get the job.
AI is here now, and other candidates might be using it to get ahead and win the job. 🧐
The form has been successfully submitted.