On Fri, Jan 16, 2009 at 12:07 PM, David Fetter da...@fetter.org wrote:
Now i want only 3 records for every typ:
test=# select typ, ts, rank() over (partition by typ order by ts desc )
from foo where rank = 3;
ERROR: column rank does not exist
LINE 1: ...rtition by typ order by ts desc )
On Fri, Jan 16, 2009 at 12:23:16PM -0500, Jaime Casanova wrote:
On Fri, Jan 16, 2009 at 12:07 PM, David Fetter da...@fetter.org wrote:
Now i want only 3 records for every typ:
test=# select typ, ts, rank() over (partition by typ order by ts desc )
from foo where rank = 3;
ERROR: