Please some help on a join question with sum aggregate

From: Feite Brekeveld <f(dot)brekeveld(at)osiris-it(dot)nl>
To: pgsql-general(at)postgresql(dot)org
Subject: Please some help on a join question with sum aggregate
Date: 2003-04-19 18:29:59
Message-ID: 3EA195A7.7070800@osiris-it.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I havbe the following SQL related question.

Table AA:

id, seqno, price

A10 1 1000.0

A10 2 2000.0

Table BB:

id seqno subseq price

A10 1 1 10

A10 1 2 20

A10 1 3 30

A10 2 1 25

I would like to have a query that joins table AA and BB to the result:

id seqno price
A10 1 1060
A10 2 2025

Thanks,

Feite Brekeveld

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Elphick 2003-04-19 18:52:35 Re: Please some help on a join question with sum
Previous Message Manfred Koizar 2003-04-19 18:06:00 Re: stddev returns 0 when there is one row