Click to See Complete Forum and Search --> : Help with a query


Sid3335
04-20-2006, 04:52 AM
I have a table that logs visitors to my websites.

it has the follwoing fields (plus others not important):

Host - the website
path - page accessed
IP - of the visitor
date
time

what i'm trying to do is get the entry points to my websites.
I will treat the first time a visitor (actual time) accesses the page on a particular day as the entry point.

out put should be:

HOST - PATH - NO OF ENTRIES (count path)

how can i get the first entries of a day and discard the rest of the records?

chazzy
04-20-2006, 10:30 AM
first verify that this returns the dates as you expect. then add other columns as needed.


select date_format(date,'%m%d%Y') AS mdy_date,min(date) FROM your_table GROUP BY mdy_date;