Skip site navigation (1) Skip section navigation (2)

Re: COUNT(*) to find records which have a certain number of

From: Chester Kustarz <chester(at)arbor(dot)net>
To: T E Schmitz <mailreg(at)numerixtechnology(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: COUNT(*) to find records which have a certain number of
Date: 2004-09-20 20:55:38
Message-ID: Pine.BSO.4.44.0409201648350.17616-100000@detroit.arbor.net (view raw or flat)
Thread:
Lists: pgsql-patchespgsql-sql
On Mon, 20 Sep 2004, T E Schmitz wrote:
> I was feeling a bit guilty about posting such a trivial question. I can
> cobble together some straightforward SQL but I could really do with a
> source of more complex SQL examples.
> If you know of any links - that would great and save the list from more
> such questions ;-)

SQL for Smarties has some more complicated examples and topics for
"advanced" type queries. I can't say it's exhaustive, but I found it
a good bridge by hinting at what is really possible. I also found that
a good way to improve is to try to write every complicated query by
using all the different ways I can think of, like:

- UNION (ALL)
- SUB-SELECT
- LEFT OUTER JOINS
- HAVING
etc.

Here is the link for SQL for Smarties:

http://www.amazon.com/exec/obidos/tg/detail/-/1558605762/002-2222957-7220055?v=glance

The bad thing about the book is that it is sort of SQL agnostic, so
some of the examples would be sub-optimal on postgresql, or may not
even work.

I would like to hear about other sources too.


In response to

pgsql-patches by date

Next:From: Devrim GUNDUZDate: 2004-09-20 21:38:17
Subject: Re: Turkish translation of initdb.pot
Previous:From: Greg StarkDate: 2004-09-20 20:45:48
Subject: Re: COUNT(*) to find records which have a certain number of dependencies ?

pgsql-sql by date

Next:From: Ramiro Batista da LuzDate: 2004-09-20 21:30:24
Subject: unsubscribe
Previous:From: Stephan SzaboDate: 2004-09-20 20:51:09
Subject: Re: Help with function

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group