Currently have a database formatted as follows:
id (unique id)
url: http://domain.com/page.html
Urls are both from the same domain and from different domains.
This also needs to be accomplished in one query so that I can use things like limits when displaying the data to the end user.
Data
1, http://domain.com/about.html
2, http://domain.com/index.html
3, http://anotherdomain.com/index.html
4, http://anotherdomain.com/contact.html
Expected Output
( I only want to return the first url (first being in which ever order the data is being sorted in, this example being "id ASC") of each group, where a groups is made up of urls that share a root domain.)
1, http://domain.com/about.html
3, http://anotherdomain.com/index.html