From: | "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk> |
---|---|
To: | GH <grasshacker(at)over-yonder(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: group by and order by question |
Date: | 2000-12-27 01:05:25 |
Message-ID: | 200012270105.eBR15RP17365@linda.lfix.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
GH wrote:
...
>So the table would look like:
>id| url |link_text | type |disp_place
>--+---------+----------+------+----------
>1 | myurl | My URL | 1 | 1
>2 | yoururl | Your URL | 2 | 3
>3 | hisurl | His URL | 1 | 4
>
>I would need a result like
>type | url | disp_place
>-----+---------+----------
> 1 | myurl | 1
> 1 | hisurl | 4
> 2 | yoururl | 3
>etc.
SELECT type, url, disp_place
FROM links
ORDER BY type, disp_place;
--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"And they said, Believe on the Lord Jesus Christ, and
thou shalt be saved, and thy house." Acts 16:31
From | Date | Subject | |
---|---|---|---|
Next Message | postgres | 2000-12-27 01:10:37 | Auto Increment |
Previous Message | Tim Barnard | 2000-12-27 00:05:50 | PQsetnonblocking question |