do not use it, I was explaining why you are getting the results you are getting. sorry if that was confusing.

-----Original Message-----
From: Che Vilnonis [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 1:44 PM
To: CF-Talk
Subject: RE: Quick SQL Question...

distinct does not seem to work (properly) either...

SELECT DISTINCT COUNT(creationdate) AS TotalRefsPerDay, creationdate
FROM         Referer
GROUP BY DATEPART(dw, creationdate), creationdate
  -----Original Message-----
  From: Eric Creese [mailto:[EMAIL PROTECTED]
  Sent: Friday, March 12, 2004 2:36 PM
  To: CF-Talk
  Subject: RE: Quick SQL Question...

  becasue all the dates are different. does a psuedo DISTINCT

  -----Original Message-----
  From: Che Vilnonis [mailto:[EMAIL PROTECTED]
  Sent: Friday, March 12, 2004 1:28 PM
  To: CF-Talk
  Subject: Quick SQL Question...

  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