I am trying to transform data from table1 into table2
table1
UserId Date1
1 9/26/2012
2 9/26/2012
1 9/26/2012
1 9/26/2012
2 9/26/2012
2 9/27/2012
2 9/27/2012
1 9/27/2012
table2
UserId Date1 recCount
1 9/26/2012 3
2 9/26/2012 2
1 9/27/2012 2
2 9/27/2012 1
This obviously does not work, but not sure where to go from here:
SELECT
UserId,
Date1,
Count(*)
FROM table1
GROUP BY UserId, Date1
The original post answers the question I asked. I had a where statement in my query that did not belong there.