Search⌘ K
AI Features

Question: Aggregate Records Using SUM

Explore writing SQL queries to calculate total marks obtained by students in Mathematics. Understand how to use the SUM aggregate function to analyze student performance data effectively for interview preparation.

Question

Given the following StudentGrades table structure:

StudentGrades

RecordID

StudentID

StudentName

Subject

Marks

1

st-101

Alexa

Mathematics

90.00

2

st-101

Alexa

Science

NULL

3

st-102

Diana

Mathematics

80.00

4

st-102

Diana

Science

88.00

5

st-103

Carl

Mathematics

NULL

6

st-103

Carl

Science

92.00

7

st-104

Sara

Mathematics

75.00

8

st-104

Sara

Science

85.00

9

st-105

Karen

Mathematics

85.00

10

st-105

Karen

Science

90.00

Additional information

You are provided with a table named StudentGrades that contains the following columns:

  • ...