Newbie: Ranking-Statement

2004-08-02 Thread Horst Jäger
Hi, suppose I've got a table RichMan with columns ID, Name, Bucks 1, 'John', 300 2, 'Joe', 700 3, 'Al', 400 4, 'Fred', 250 5, 'Jim', 480 and I sort them with respect to Bucks. Then John would be on the first place because he ist the richest, followed by 'Jim', etc. Now I'm looking for an

Re: Newbie: Ranking-Statement

2004-08-02 Thread Brent Baisley
Well, giving the rank and getting the ID is simple: SELECT * FROM RichMan ORDER BY Bucks DESC LIMIT 4,1 That will return 1 record starting at the 4th record. The first one is a bit tougher. Thinking on it. On Aug 2, 2004, at 7:23 AM, Horst Jäger wrote: Hi, suppose I've got a table RichMan with