Hi Allhow to solve for the error i have been getting when using group by clause for the below query .What am i doing wrong?SELECT RR.REQUESTID,count(CD.totalsubs) as Subscribers,count(CD.Totalmem) as Members,RD.rptdesctext,Recp.emailadrFROM report_request RR inner join Selected_report SR on RR.requestid = SR.requestid inner join REport_description RD on SR.rptdesc = RD.rptdesc inner join Recepients Recp on RR.requestid = Recp.requestid inner join customer_detail CD on RR.MSGN = Cd.msgnwhere SR.completeddt between '1/1/2012' and '12/31/2012' and RR.reportfrequency != 'One Time'group by RR.REQUESTID,count(CD.totalsubs),count(CD.Totalmem),RD.rptdesctext,Recp.emailadr
Error MessageCannot use an aggregate or a subquery in an expression used for the group by list of a GROUP BY clause.Thanks