Paul Lambert wrote:
>
> Just use distinct...
>
> test=# select distinct count(*),substring( href from '.*://([^/]*)' ) as
> domain from url group by domain order by domain;
OK so distinct was redundant there... it gives the same results without it.
AutoDRS=# select count(*) as occurances,substring( href from
'.*://([^/]*)' ) as domain from url group by domain order by occurances
desc,domain; occurances | domain
------------+-------------------------- 11 | www.google.com 4 | dictionary.reference.com 4 |
texturizer.net 3 | devedge.netscape.com 3 | groups.google.com 2 | forums.mozillazine.org
2 | www.mozillazine.org
(7 rows)
--
Paul Lambert
Database Administrator
AutoLedgers