Hi I am having an issue with getting total rowcount from my table based on the dates. What i need is total rowcount up the the date selected. for example my query is..... SELECT distinct [CensusDateKey] FROM my table where CensusDateKey >= 20130408 ---- my results are CensusDateKey 20130408 20130409 20130410 20130411 What I need is total rowcount as if those dates. I tried... SELECT distinct [CensusDateKey] ,COUNT(*)as 'RowCount' FROM mytable where CensusDateKey <= 20130408 group by CensusDateKey order by CensusDateKey asc But that gives me rowcount for those dates instead of running total count from day 1.