R
Richard Hollenbeck
First: I want to thank you guys very much. I've learned much this
newsgroup. I'm still having a tough time with aggregate queries.
Next the code:
SELECT sum((groups.groupWeight/Sum(groups.groupWeight)) *
(activities.activityWeight / Sum(activities.activityWeight)) *
studentScores.score) AS [WeightedAverage] FROM groups, activities,
studentScores GROUP BY studentScores.studentID;
Now the error:
"You tried to execute a query that does not include the specified expression
'groups.groupWeight/Sum(groups.groupWeight)*(activities.activityWeight/Sum(a
ctivities.activityWeight))*studentScores.score' as part of an aggregate
function."
the sum of all the scores times the group weight times the activity weight
for one student will be that student's grade for the semester. But each
group's weight needs to first be divided by the sum of all the group weights
in the course and the activity weight needs to be divided by the sum of all
the activity weights in that group.
This query isn't even finished. I need to determine how many students in a
course got an A, B, C, D, or F for a report about the course stats:
A >= 92
B >= 82<92
C >= 72<82
D >= 62<72
F < 62
I think I could figure out the logic of how to do this (MAYBE,) but I'm
having trouble getting the aggregate query to cooperate with me. I don't
like how this works, probably because I don't fully understand how this kind
of query works.
newsgroup. I'm still having a tough time with aggregate queries.
Next the code:
SELECT sum((groups.groupWeight/Sum(groups.groupWeight)) *
(activities.activityWeight / Sum(activities.activityWeight)) *
studentScores.score) AS [WeightedAverage] FROM groups, activities,
studentScores GROUP BY studentScores.studentID;
Now the error:
"You tried to execute a query that does not include the specified expression
'groups.groupWeight/Sum(groups.groupWeight)*(activities.activityWeight/Sum(a
ctivities.activityWeight))*studentScores.score' as part of an aggregate
function."
the sum of all the scores times the group weight times the activity weight
for one student will be that student's grade for the semester. But each
group's weight needs to first be divided by the sum of all the group weights
in the course and the activity weight needs to be divided by the sum of all
the activity weights in that group.
This query isn't even finished. I need to determine how many students in a
course got an A, B, C, D, or F for a report about the course stats:
A >= 92
B >= 82<92
C >= 72<82
D >= 62<72
F < 62
I think I could figure out the logic of how to do this (MAYBE,) but I'm
having trouble getting the aggregate query to cooperate with me. I don't
like how this works, probably because I don't fully understand how this kind
of query works.