# Thread: How to buld a querry to seclet the grades in the only term to calculate the average?

1. Registered User
Join Date
Jan 2008
Posts
8

## Unanswered: How to buld a querry to seclet the grades in the only term to calculate the average?

Hi all,
I am building a program to manage students in a college.I am in trouble with calculating average grade for every student.
I have a form that allows user to add grades of all subjects in first term, second term, third term, .....and sixth term.Now I have to caltculate the every term average grade for every student.Please tell me how to select the grades in every term to calculate the average grade for evey term.
Thanks in advenced for all helps!

2. L33t Helpa Munky
Join Date
Nov 2007
Location
Posts
4,049

3. SQL Consultant
Join Date
Apr 2002
Location
Posts
20,002
Originally Posted by StarTrekker
what's wrong with the AVG function, plz?

4. L33t Helpa Munky
Join Date
Nov 2007
Location
Posts
4,049
Nothing. Without seeing a table structure, I wasn't willing to make the assumption that all the grades are from the same field.

BTW, what's the significance of 937?

5. SQL Consultant
Join Date
Apr 2002
Location
Posts
20,002
Originally Posted by StarTrekker
BTW, what's the significance of 937?
it's a bit like 42, only exponentially better

6. L33t Helpa Munky
Join Date
Nov 2007
Location
Posts
4,049
Oh... but it's not even a factor of 42, so I guess your calculations are off

7. SQL Consultant
Join Date
Apr 2002
Location
Posts
20,002
not factor, exponent

solve for a: 42&#170; = 937

8. L33t Helpa Munky
Join Date
Nov 2007
Location
Posts
4,049
1.83073518554557.

Still not very convincing... seems to me there is no relationship between 937 and 42

9. SQL Consultant
Join Date
Apr 2002
Location
Posts
20,002
sure there is

do you play bridge?

42 is the answer to everything