Hello,How can I write this code so that I can add the WHERE clause (in bold) ? USE myMarketGO SELECT STDEVP(c.PublOffers) As StandardDev FROM ( SELECT theDate, SUM(PublishedOffers) As PublOffers FROM PublOffersControl WHERE MONTH(Data) = 3 And YEAR(Data) = 2006 And Antiquity = 7 GROUP BY theDate ) As c WHERE User_num IN(277, 288) --User_num is a column of 'PublOffersControl' table.
I can' t 'GROUP BY' User_number because to get the statistical number STDEVP (Standard Deviation) correctly I need to 'GROUP BY' theDate column only in the selection/derived table (c) Thanks