mysql> select referrer,count(*) as total from tracking where referrer like 'www.richards-realm.com%' group by hit; +------------------------------------------------------------+-------+ | referrer | total | +------------------------------------------------------------+-------+ | http://www.richards-realm.com/thumbn...ge=YoungLadies | 6964 | | http://www.richards-realm.com/thumbnails/ | 6219 | | http://www.richards-realm.com/thumbnails/ | 4629 | | http://www.richards-realm.com/thumbnails/ | 3306 | +------------------------------------------------------------+-------+ 4 rows in set (0.24 sec)