Re: select top N entries from several groups

From: "Reinhard Hnat" <hnat(at)logotronic(dot)co(dot)at>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: select top N entries from several groups
Date: 2005-04-12 13:53:38
Message-ID: 002901c53f67$0a7a8470$0163a8c0@hnat
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Would you like:

INSERT INTO finaltable SELECT gp, val FROM temp where gp = 'A' ORDER BY val
DESC LIMIT 2;

best regards
R.Hnat

Browse pgsql-novice by date

  From Date Subject
Next Message Bob Talbot 2005-04-12 14:17:41 Windows Install
Previous Message Sean Davis 2005-04-12 12:21:40 Re: select top N entries from several groups