Pls help - Limiting query results by percentage of results

From: "Brian G(dot) Huber" <brianghuber(at)yahoo(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Pls help - Limiting query results by percentage of results
Date: 2003-08-20 19:58:17
Message-ID: 000801c36755$663b4fb0$6400a8c0@bghmobile
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello all -

I am trying to limit the results of a query using the LIMIT clause - but instead of an absolute number I would like to limit by a percentage of rows returned.

It seems the LIMIT clause only supports absolute numbers. Any ideas greatly appreciated.

TIA,
BGH

PS - The analogous syntax in Access is "SELECT TOP n PERCENT" which returns the top n percent of rows ordered by ORDER BY.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2003-08-20 21:18:41 Re: Pls help - Limiting query results by percentage of results
Previous Message dan 2003-08-20 19:41:01 Help with pg_restore