Re: Extracting hostname from URI column - Mailing list pgsql-sql

From Paul Lambert
Subject Re: Extracting hostname from URI column
Date
Msg-id 46E764FB.2070602@autoledgers.com.au
Whole thread Raw
In response to Re: Extracting hostname from URI column  (Paul Lambert <paul.lambert@autoledgers.com.au>)
List pgsql-sql
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



pgsql-sql by date:

Previous
From: ogjunk-pgjedan@yahoo.com
Date:
Subject: Re: Extracting hostname from URI column
Next
From: Alvaro Herrera
Date:
Subject: Re: Extracting hostname from URI column