query advice

Поиск
Список
Период
Сортировка
От Nathanial Mayweather
Тема query advice
Дата
Msg-id BAY123-F3390B49529E765B7CD82A7AC7C0@phx.gbl
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: "Timasmith"
Дата:
Сообщение: Re: which is more scalable for the database?
Следующее
От: Stefan Berglund
Дата:
Сообщение: Re: Is This A Set Based Solution?