I am unable to extract data according to date in sql server,
what I exactly want is count of the data on every date, i.e data count according to date.
what I exactly want is count of the data on every date, i.e data count according to date.
Thanks in advanced!!
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Nov 20, 2013, 1:38 AM EST
select COUNT(*) as 'Data Row Count', ShippedDate from Orders group by ShippedDate
Girish Sapariya159 reputationPosted Nov 20, 2013, 1:38 AM EST
select COUNT(*) from TableName where dateColumn = '2014-11-07'
date format for sql server = YYYY-MM-DD
Hanook159 reputationPosted Nov 20, 2013, 8:31 PM EST
from TableName
group by Cast ( DateColumn aS DATE)
depends on DateColumn.. if that is DATETIME type convert it to DATE and then apply GROUP BY....