Question: Write a SQL query to calculate the rank of students in each subject based on their marks. The output should include the Name, Subject, Marks,

Write a SQL query to calculate the rank of students in each subject based on their marks. The output should include the Name, Subject, Marks, and rank of each student for each subject.
Tables Schema as Below:
Students
columnName dataType
ID INT
Name VARCHAR(50)
Subject VARCHAR(50)
Marks DECIMAL(10,2)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!