many to many relationship Query ? - Mailing list pgsql-sql

From Morris, Sam@EDD
Subject many to many relationship Query ?
Date
Msg-id D317C095B8FCD111BAA200805FE68574995C72@eddexmb04.cahwnet.gov
Whole thread Raw
List pgsql-sql
I am having problems composing query.  I would like to compare the sums of
each table for a given date.
I have two tables :

T1.date        T1.Amount
06/07/64    $1
06/07/64    $3

T2.date        T2.date
06/07/64    $10
06/07/64    $20

I would like an output of :
T1.date        Sum(T1.amount)    Sum(T2.Amount)
06/07/64    $4            $30

I have tried:
select T1.date, Sum(T1.amount), Sum(T2.Amount)
from T1, T2
where T1.date="06/07/64" and T2.date="06/07/64"
group by T1.date;
This unfortunatly generates:
T1.date        Sum(T1.date)        Sum(t2.date)
06/07/64    $8            $30
What is the best way to do this?

pgsql-sql by date:

Previous
From: "Jackson, DeJuan"
Date:
Subject: RE: [SQL] A path through a tree
Next
From: Frank Barknecht
Date:
Subject: Re: [SQL] Text type