I need to search a database to find out the most common addresses

G

GregP

Can anyone help me get started with this? I need to query my database to
find out what the most visited addresses are.

I can't even manage to form a query that will get me information from the
knowledge base. Please Help Me!!
 
R

Rick B

You might tell us the structure of your database.

I'm assuming it tracks website hits? Do you have a table that contains the
addresses? How do you track hits? Is a record added each time an address
is hit?

Give us some details here.
 
G

GregP

See? I told you I was having trouble constructing a query...;-}

Actually, this database tracks actual physical addresses. We are a
transportation company and I want to find what the most visited addresses
are. The db has a separate table that contains the records of all trips for
a couple of years. I'm fairly experienced at writing Access queries to get
info from this database, but I don't know how to start with this one.

Thanks for any help.
 
J

John Spencer (MVP)

Perhaps something like the following, using the TOP predicate and a totals query.

SELECT TOP 5 T.[Address]
FROM [TableDeliveries] as T
GROUP BY T.[Address]
ORDER BY Count(T.[Address]) Desc
 
Top