query advice - Mailing list pgsql-general

From Nathanial Mayweather
Subject query advice
Date
Msg-id BAY123-F3390B49529E765B7CD82A7AC7C0@phx.gbl
Whole thread Raw
List pgsql-general
I'm stuck on a query, I'm hoping someone can point me to the obvious

I need to limit the results of a query based on 2 criteria:
    1- total rows grouped by column_a
    2- total rows all

given:
    books:   id , author , subject , title

i need to

    SELECT * FROM books WHERE subject= 'database'
    Limit to : no more than 10 records per 'author'
    Limit to : 100 records total

I'm really rusty on my sql this week.

Any pointers would be appreciated.

_________________________________________________________________
Get a FREE Web site, company branded e-mail and more from Microsoft Office
Live! http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/


pgsql-general by date:

Previous
From: "Timasmith"
Date:
Subject: Re: which is more scalable for the database?
Next
From: Stefan Berglund
Date:
Subject: Re: Is This A Set Based Solution?