John R Pierce wrote on 24.01.2013 00:19:
>> - No SQL knowledge at all; needs to start from square 1.
>>
>> - Smart, capable person, who will be in this position for a long
>> time, using this db for a long time.
>>
>> - No chance in hell this db will be moved off PG, so PG-centric is
>> fine
>
>
> I can't recommend any specific book as I've not read any of them (and
> been doing SQL too long). But what I *can* recommend is creating a
> 'sql cookbook', maybe on an internal wiki or blog, with a bunch of
> sample queries specific to YOUR database schema that solve the sorts
> of problems your user base including this client are likely to come
> up against. start with the simplest things and move up to more
> complex. have a paragraph or two explaining each query, and example
> output.
Speaking of "cookbook": The DB2 SQL Cookbook is quite nice actually.
http://mysite.verizon.net/graeme_birchall/id1.html
Even though it's for DB2 most of it (except e.g. the XQuery stuff) can be used for PostgreSQL as well.
Thomas