Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: trouble with joins
Try...
select a.column1, sum(a.column2), sum(nvl(b.column2))
from
table1 a,
table2 b
where
a.column1 = b.column1(+)
group by
a.column1
-Ethan
www.freetechnicaltraining.com
In article <93dit7$gov$1_at_nnrp1.deja.com>,
Glen A. Stromquist <glenstr_at_my-deja.com> wrote:
> I have two tables, table A has 62 rows table B has 1, (but could be
> more), both share a common column.
>
> I want my query to show a sum of all of the rows in table A, and the
> sum of the row or rows in table B on the same row.
>
> The join column is neither of these columns, but is my "group by"
> column.
>
> whats the best way to do this?
>
> Sent via Deja.com
> http://www.deja.com/
>
Sent via Deja.com
http://www.deja.com/
Received on Mon Jan 08 2001 - 17:53:29 CST