Pls help - Limiting query results by percentage of results - Mailing list pgsql-novice

From Brian G. Huber
Subject Pls help - Limiting query results by percentage of results
Date
Msg-id 000801c36755$663b4fb0$6400a8c0@bghmobile
Whole thread Raw
Responses Re: Pls help - Limiting query results by percentage of results
List 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.

pgsql-novice by date:

Previous
From: "dan"
Date:
Subject: Help with pg_restore
Next
From: Josh Berkus
Date:
Subject: Re: Pls help - Limiting query results by percentage of results