retagged by
2,281 views
2 votes
2 votes

Student (Sid,gender,marks,branch)

Query: Retrieve Sid's who scored the highest mark?

SELECT SID 
FROM Student

EXCEPT

SELECT T1.Sid
FROM Student T1,Student T2
WHERE T1.marks < T2.marks

What are other possible correct variation equal to this query in SQL ? 

retagged by

2 Answers

0 votes
0 votes
SELECT sid

FROM Student

WHERE Marks IN (SELECT  MAX(Marks)

                            FROM Student);

Related questions

0 votes
0 votes
1 answer
4
rayhanrjt asked Jan 6, 2023
771 views
Write SQL command to find DepartmentID, EmployeeName from Employee table whose average salary is above 20000.