Answer: Sorting and Calculations
Explore SQL techniques to sort data using the ORDER BY clause, replace NULL values with COALESCE, and limit query results. Understand filtering, aliasing, and subqueries to refine data sorting for effective query building.
Solution
The solution is given below:
Explanation
The explanation of the solution code is given below:
Line 2: The
SELECTquery selectsStudentName,TheoryMarks,PracticalMarks, andCumulativeMarks.Line 3: The
FROMclause specifies the table name asStudentGrades.Line 4: The
WHEREclause selects the subject in hand.Line 5: The
ORDER BY...