Hi,I am working on a query that isn't yet right.The problem is that I'm using the aggregate function "count(MS.messageID) as numbPosts" which requires the other columns in the group by. MS.message is an nText field and can not be included in a group by column... How do I get around this?ThanksRps. #URL.topicID# is a variable that resolves to an integerSELECT TP.topicTitle , TP.topicSubTitle , MB.nickname , MB.memberID , MB.city , MB.country , MB.email , MB.publicemail , MB.webaddress , MB.dateAdded , MS.message , MS.correctAnswer , MS.dateAdded , count(MS.messageID) as numbPosts FROM (( f_topics as TPLEFT JOIN f_messages as MS ON TP.topicID = MS.topicID)LEFT JOIN f_members as MB ON MS.memberID = MB.memberID) WHERE TP.topicID = #URL.topicID# AND TP.active = '1' AND MS.active = '1'GROUP BY TP.topicTitle , TP.topicSubTitle , MS.correctAnswer , MS.dateAdded , MB.nickname , MB.memberID , MB.jtitle , MB.city , MB.country , MB.email , MB.publicemail , MB.webaddress , MB.dateAddedORDER BY MS.correctAnswer DESC, MS.dateAdded