Search Postgresql Archives

query advice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux