Hi! I have the following select statement (which people from this forum helped me with -Thanks!)I'm having trouble adding another condition to the where clause.Here's the statement: SELECT mydate, [source], countofsourceid FROM ( SELECT Sources.source, COUNT(users.filesource) AS CountOfSourceID, DATEADD(Day, DATEDIFF(Day, 0, users.mydate), 0) AS mydate FROM Sources RIGHT OUTER JOIN users ON Sources.SourceID = users.filesource GROUP BY Sources.source, DATEADD(Day, DATEDIFF(Day, 0, users.mydate), 0), users.Isdouble HAVING users.Isdouble = 0 ) T where myDate ='20041024'
I want to ad where country='US' but whereever I put it I still get errors. Where's the right place to add it? (country is in the user table)