Meir
Meir

Reputation: 12755

How to find an average grade for each student with SQL

I have a list of grades that students received. Each student appears multiple times in the table. How do I produce a list of all the students with their average grade?

P.s. I've tried looking at previously asked questions to see if I can find something relevant, but with no luck.

Upvotes: 0

Views: 1671

Answers (2)

Phil Sandler
Phil Sandler

Reputation: 28016

Since it's homework . . .

You are basically trying to aggregate data in SQL. Try googling along those lines.

Upvotes: 0

dan04
dan04

Reputation: 90995

Look up the AVG function and the GROUP BY clause.

Upvotes: 2

Related Questions