> Hi, I have a table full of logged urls and ip addresses. The following
> query returns all the urls and the number of requests. How would I
> modify it to return unique requests based on distinct ip addresses?
>
> select url, count(*) as pageviews from table group by url order by
> pageviews desc



How about:


SELECT ip_address, url, count(*)
FROM tablename
GROUP BY ip_adress, url





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to