a mysql database i'm working with has thousands of urls. now, a lot of those urls will be from the same domain, but each one will have differing sub-domains and page names. e.g.

```
somewebsite.com/gj29sjw  
somewebsite.com/29shw0a  
somewebsite.com/92jslwa

anothersite.net/jfdkden   
anothersite.net/hj2892j  
anothersite.net/282j290

```

etc...

Is there a query or syntax I can use to both group those urls and count them in largest first order, without the subdomains and page names. Ideally, after i run the count query, I would need to get:

```
somewebiste.com | 345 
anothersite.net | 289

```