T
Tami
I'd like the query to drop the lowest of the four scores and add the
highest three scores giving me a final score (TheScore). I grouped on
several
fields. Is this confusing it so that it doesn't know that each student is
it's own group with four scores? It appears to be giving me a total on all of
the students together.
Project No connects the Tables together. Can a query compare all records
with the same Project No. to find the lowest score and add just the three
highest scores?
StudentScores is my 2nd Table with ScoreID
ScienceFair is my 1st Table with STUDENTsfID
This is what I'm getting in my query and the program follows:
LastName FirstName ProjectNo Score TheScore
DelSignore Joslyn 4 75 0
DelSignore Joslyn 4 85 0
DelSignore Joslyn 4 90 0
DelSignore Joslyn 4 100 0
Doherty Elyse 2 50 0
Doherty Elyse 2 80 0
Doherty Elyse 2 87 0
Doherty Elyse 2 99 0
Elia Victoria 1 75 0
Elia Victoria 1 80 0
Elia Victoria 1 90 0
Elia Victoria 1 98 0
Shore Robert 3 85 0
Shore Robert 3 90 0
Shore Robert 3 100 100
SELECT ScienceFair.LastName, ScienceFair.FirstName, StudentScores.ProjectNo,
StudentScores.Score, Sum(Score)-Min(Score) AS TheScore
FROM ScienceFair INNER JOIN StudentScores ON ScienceFair.ProjectNo =
StudentScores.ProjectNo
GROUP BY ScienceFair.LastName, ScienceFair.FirstName,
StudentScores.ProjectNo, StudentScores.Score;
highest three scores giving me a final score (TheScore). I grouped on
several
fields. Is this confusing it so that it doesn't know that each student is
it's own group with four scores? It appears to be giving me a total on all of
the students together.
Project No connects the Tables together. Can a query compare all records
with the same Project No. to find the lowest score and add just the three
highest scores?
StudentScores is my 2nd Table with ScoreID
ScienceFair is my 1st Table with STUDENTsfID
This is what I'm getting in my query and the program follows:
LastName FirstName ProjectNo Score TheScore
DelSignore Joslyn 4 75 0
DelSignore Joslyn 4 85 0
DelSignore Joslyn 4 90 0
DelSignore Joslyn 4 100 0
Doherty Elyse 2 50 0
Doherty Elyse 2 80 0
Doherty Elyse 2 87 0
Doherty Elyse 2 99 0
Elia Victoria 1 75 0
Elia Victoria 1 80 0
Elia Victoria 1 90 0
Elia Victoria 1 98 0
Shore Robert 3 85 0
Shore Robert 3 90 0
Shore Robert 3 100 100
SELECT ScienceFair.LastName, ScienceFair.FirstName, StudentScores.ProjectNo,
StudentScores.Score, Sum(Score)-Min(Score) AS TheScore
FROM ScienceFair INNER JOIN StudentScores ON ScienceFair.ProjectNo =
StudentScores.ProjectNo
GROUP BY ScienceFair.LastName, ScienceFair.FirstName,
StudentScores.ProjectNo, StudentScores.Score;