Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / January 2006

Tip: Looking for answers? Try searching our database.

Page Hits Calculations

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JD - 27 Jan 2006 13:17 GMT
Hello Everyone,

I have set up a table that contains the following fields
1. DateAdded
2. PageName

And I am trying to write a query that will pull back records for me where I
can count up the number of times a page or pages were hit on the website for
each day. So if my records were like this

DateAdded                           PageName
1/1/2006                                /index.htm
1/1/2006                               /index.htm
1/1/2006                               /contact/index.htm
1/2/2006                               /index.htm
1/2/2006                                /contact/index.htm
1/2/2006                                /contact/thankyou.htm

that after query has run I would have something like this
Date        Page             Number of Visits
1/1/2006 /index.htm                2
1/1/2006 /contact/index.htm    1
1/2/2006  /index.htm                1
1/2/2006  /contact/index.htm   1
1/2/2006  /contact/thankyou.htm 1

I am trying to keep this in sql, but if this this is not possible then I can
always do this in the code on my asp.net page, any help on this would be
appreciated.

Signature

J. Daly

Sylvain Lafontaine - 27 Jan 2006 17:04 GMT
Using a Group By on DateAddedd and PageName and a Count() should give you
what you want; something like:

Select DateAdded, PageName, Count(*) from MyTable Group By DateAdded,
PageName Order by DateAdded ASC, Count(*) DESC, PageName ASC

Signature

Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF

> Hello Everyone,
>
[quoted text clipped - 25 lines]
> can always do this in the code on my asp.net page, any help on this would
> be appreciated.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.