Answer: Aggregate Records Using SUM
Find a detailed explanation of using the SUM function to aggregate records in a table using SQL query.
We'll cover the following...
We'll cover the following...
Solution
The solution is given below:
Explanation
The explanation of the solution code is given below:
Line 2: The
SELECTquery finds the sum of students’ marks for Mathematics. We useASto set an alias for the column.Line 3: The
FROMclause specifies the table,StudentGrades.Line 4: In the
WHEREclause, we specify the subject to filter the data. ...