This SQL Code works:
SELECT COUNT(creationdate) AS TotalRefsPerDay
FROM Referer
GROUP BY DATEPART(dw, creationdate)

197
364
350
294
260
243
196

But when I add a column... this does not):
SELECT COUNT(creationdate) AS TotalRefsPerDay, creationdate
FROM Referer
GROUP BY DATEPART(dw, creationdate), creationdate

1 3/4/2004 5:07:35 PM
1 3/4/2004 5:09:27 PM
1 3/4/2004 5:11:19 PM
1 3/4/2004 5:13:14 PM
1 3/4/2004 5:14:31 PM
1 3/4/2004 5:14:53 PM
1 3/4/2004 5:16:19 PM
1 3/4/2004 5:20:37 PM
1 3/4/2004 5:21:10 PM

What am I doing wrong? I'd like a simple two column table: creation date
and the total number of referers for each day!

TIA...Che
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to