joins with aggregates

From: "Remigiusz Sokoowski" <rems(at)gdansk(dot)sprint(dot)pl>
To: pgsql-sql(at)postgresql(dot)org
Subject: joins with aggregates
Date: 1998-12-11 14:42:05
Message-ID: 36712F3D.8DC8D68F@gdansk.sprint.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi!
I'm wonder if it is possible to make a query which joins data from two
tables and also aggregates some columns of one of them
I mean something like
SELECT p1.id_prod, p1.name_prod, d1.id_prod, sum(d1.quant_detal) FROM
prod p1, detal d1 WHERE p1.id_prod=d1.id_prod
GROUP BY p1.id_prod;
TIA
Rem

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message George Moga 1998-12-11 15:55:59 Re: [SQL] joins with aggregates
Previous Message Michael Yeung 1998-12-10 00:32:19 Lock the server