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. ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]