I need to group some data from my DB, say if my data is
url, siteId
abc, 1
abc, 1
abc, 2
abc, 2
abc, 2
I need to count the number of URL's at each site. I tried using GROUP BY url and SELECT *, COUNT(url) as urlCount, however, that grouped all 5 together. Is this possible using mysql alone or would I need some PHP to format that data?