> I don't see why this wouldn't work:
>
> SELECT log.host,count(*) as hits FROM log, robots WHERE
> log.host=robots.host AND status IN (200,304)
> GROUP BY log.host ORDER BY hits DESC ;
>
> Len Morgan
Thanks. This does work of course, however I forgot to mention that the
query must filter out any duplicates in the 'log' table. Simplified:
time | host | url
-----+---------+--------
001 | dec.com | index
003 | dec.com | index
011 | dec.com | index
015 | dec.com | content
057 | xyz.com | index
desired result:
host | hits
--------+-----
dec.com | 2
xyz.com | 1
--
Eric Jain