Skip to main content
nikos101
Inspiring
February 16, 2009
Answered

I need a query that selects the amount of records for each day in a table.

  • February 16, 2009
  • 1 reply
  • 468 views
I need a query that selects the amount of records for each day in a table.
Eg the result would be:

date 1 14
date 2 3

etc

Any ideas?
This topic has been closed for replies.
Correct answer nikos101
sorted:

SELECT count([commentID]),convert(varchar, dateAdded, 112)


FROM COMMENTSgroup by convert(varchar, dateAdded, 112)

1 reply

nikos101
nikos101AuthorCorrect answer
Inspiring
February 16, 2009
sorted:

SELECT count([commentID]),convert(varchar, dateAdded, 112)


FROM COMMENTSgroup by convert(varchar, dateAdded, 112)