order by - Mailing list pgsql-sql

From Mathieu Arnold
Subject order by
Date
Msg-id 1713675304.1021384181@andromede.reaumur.absolight.net
Whole thread Raw
Responses Re: order by  (Christoph Haller <ch@rodos.fzk.de>)
Re: order by  (Mathieu Arnold <mat@mat.cc>)
Re: order by  ("Joel Burton" <joel@joelburton.com>)
Re: order by  ("D'Arcy J.M. Cain" <darcy@druid.net>)
List pgsql-sql
Hi

I have :

table a (int, varchar, int)

1 | one   | 1
2 | two   | 3
3 | three | 2
4 | four  | 3
5 | five  | 2

And I would like to select it and sort it so that the 3rd field is first 2, 
then 1 and then 3. so that the result should be :

1 | one   | 1
3 | three | 2
5 | five  | 2
2 | two   | 3
4 | four  | 3

How could I do that ?

-- 
Mathieu Arnold


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Various PostgreSQL questions
Next
From: Christoph Haller
Date:
Subject: Re: order by