Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Simple SQL?

Re: Simple SQL?

From: Isaac Blank <izblank_at_yahoo.com>
Date: Thu, 17 May 2001 09:38:42 -0700
Message-ID: <68TM6.15$uN.19977@news.pacbell.net>

SELECT a,

    (SELECT SUM(b2) from Tblb WHERE Tbla.a=Tblb.b1),     (SELECT SUM(c2) from Tblc WHERE Tbla.a=Tblc.c1) FROM Tbla

"Stefan Peschke" <stpeschke_at_scopeland.de> wrote in message news:9e0me6$fcfl$1_at_ID-86706.news.dfncis.de...
> Hi,
> is there a 'simple' SQL-statement for the following problem?
>
> I have 3 tables
>
> Tbl a
> a
> 1
>
> Tbl b
> b1 b2
> 1 1
> 1 2
>
> Tbl c
> c1 c2
> 1 3
> 1 4
> 1 5
>
>
> Relationen
> a -->> b
> a -->> c
>
> and I want
> a sum(b) sum(c)
>
> in ONE row:
>
> a sum(b2) sum(c2)
> 1 3 12
>
> Does anyone have a clue?
>
> Thank You,
>
> Stefan Peschke
>
>
>
Received on Thu May 17 2001 - 11:38:42 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US