Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL to Access - Can I ORDER BY a SUM column 1

Status
Not open for further replies.

elvenmaiden

Programmer
Apr 25, 2002
31
US
This is what I have, but it doesn't seem to recognize the AcceptanceRate as a valid sort field.

SELECT qryStats.Name, qryStats.Subject, qryStats.Questions, qryStats.Solutions, AVG(qryStats.AcceptRate)as AcceptanceRate FROM qryStats WHERE qryStats.UserEmail = '&quot; + mstrUser + &quot;' AND qryStats.OrigDate >= # &quot; & DTPBegin.Value & &quot; # AND qryStats.OrigDate <= # &quot; & DTPEnd.Value & &quot; # GROUP BY qryStats.Name, qryStats.Subject, qryStats.Questions, qryStats.Solutions ORDER BY AcceptanceRate
 
Use ORDER BY AVG(qryStats.AcceptRate) instead of ORDER BY AcceptanceRate.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top