Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Count by day

Author  Topic 

jwallz
Starting Member

14 Posts

Posted - 2005-11-23 : 10:07:44
I need to display a total number of site visits by day for a date range. Can anyone help with this? I can't seem to figure it out.

John

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2005-11-23 : 10:20:40
Post your table structure and sample data as suggested in

[url]http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx[/url]

-----------------
[KH]
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2005-11-23 : 10:21:35
EDIT: D'oh

John, Please read my hint link in my sig...we need a bit (well a lot) more info to help.



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-11-23 : 23:50:25
Something like

Select day(datecol),count(*) as DayCount from yourTable where Datecol between date1 and date2 group by day(datecol)

If not post more informations suggested earlier

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -