I am hoping some one can asset me with obtaining the proper sorting for this
aggregate query. I just can't see it.
Basically I wish to sort by Userrating, but only on records that have a
Responses count greater that 8.
SELECT FilesCategory.Cat_Name,
Avg(Comments.Numeric1) AS Userrating,
Count(Comments.Numeric1) AS Responses
FROM (FilesData LEFT JOIN Comments ON FilesData.ID = Comments.LinkID) LEFT
JOIN FilesCategory ON FilesData.FilesCategory = FilesCategory.CatID
GROUP BY FilesCategory.Cat_Name
If I "ORDER BY Responses DESC, Userrating DESC" I get the records that had
the most responses first but are not the highest rated.
What I'd like is to turn the "Count(Comments.Numeric1) AS Responses"
statement into a Boolean where 0 if < 9 and 1 > 8.
Any ideas? I know I am missing something.
Best Regards,
Dennis Powers
UXB Internet- A Website Design and Hosting Company
690 Wolcott Road - P.O. Box 6028
Wolcott, CT 06716
Tel: 203-879-2844
http://www.uxbinternet.com
http://dennis.uxb.net
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234779
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54