+ 1
Write a query to display the name, department name and marks of the top perfomer in software engineering order by department nme
2 Antworten
+ 1
Gaurav Tiwari It seems your question appears to be an assignment. Please show us your attempt and use the 8 rules to get help from the community.
https://www.sololearn.com/Blog/38/8-simple-rules-to-get-help-from-the-community
*can be a code coach solution which is meant for you to do to help you establish your skills abilities and where you need to learn... not the community
*one issued by a school or other institution
*one issued or created by another platform
*one that appears to be in the form of a challenge that was created by you or somewhere else.
Your question will be reviewed by a team of moderators and will most likely be marked for deletion.
https://www.sololearn.com/Discuss/1316935/?ref=app
0
I assume your columns names as name, dept (for department name) , marks_SE (for marks in software engineering) and your table name as student.
Now, the query is:
select name, dept, marks_SE from student where marks_SE in( select max(marks_SE) from student group by dept);
I haven't run this query to check whether it is correct or not. I am answering it on the basis of my knowledge.
This query uses the concept of nested subqueries.