simple yet complex join - Mailing list pgsql-general

From Vincent Stoessel
Subject simple yet complex join
Date
Msg-id 3CE44009.6090305@xaymaca.com
Whole thread Raw
Responses Re: simple yet complex join
Re: simple yet complex join
List pgsql-general
Hello All,
I've been reading the archives, the manual and  my sql books.
lack of sleep is making what seems easy very hard to figure out
right now.

what kind of join do I have to do in order to combine 3 tables of
similiar information. For example 3 months' worth of payments from
customers:


jan_pay


tom 25
ron 30
jim 0


feb_pay

tom 25
ron 20
jim 10


march_pay

tom 25
ron 30
jim 5
pat 40



I want a result that looks like this :


tom 25 25 25
ron 30 20 30
jim  0 10  5
pat  0  0 40



I've tried so many kinds of strage joins that I am ashamed to post them
here. Can someone please light the candle?
Thanks in advance.


--
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com


pgsql-general by date:

Previous
From: Lev Lvovsky
Date:
Subject: foreign key reference on array elements?
Next
From: Lev Lvovsky
Date:
Subject: if !NULL ?