Bear with me, I suck at doing subqueiries and need a bit of help.
I want to do:
Select SUM(mycount),item_id FROM mytable WHERE SUM(mycount)>10 AND DATEDIFF(day,datestamp,GETDATE())<=30 GROUP BY item_id
This of course fails with an error like the follow:
An aggregate may not appear in the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.