Re: [SQL] Getting the ranks of results from a query

2004-04-06 Thread Bruno Wolff III
On Thu, Apr 01, 2004 at 11:05:55 -0500, abhi <[EMAIL PROTECTED]> wrote: > I have a query of the form > > select id from member order by age; > > id > - > 431 > 93 > 202 > 467 > 300 > > In addition to the id, I would like the get the rank of the row-- > in other words: > > id

[SQL] Getting the ranks of results from a query

2004-04-05 Thread abhi
I have a query of the form select id from member order by age; id - 431 93 202 467 300 In addition to the id, I would like the get the rank of the row-- in other words: id | rank -+--- 431 | 1 93 | 2 202 | 3 467 | 4 300 | 5 How do I do this with postgres? In the pa