this is what I know
SELECT domain FROM domain_table GROUP BY domain
Here is a possible result
www.domain.com, domain.com, sub.domain.com, domain.co/a-page
Is it possible to apply regex (or a hack) to the above select statement so that i will get domain.co instead of domain.co/a-page