Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> [Fwd: Re: Having trouble with a query]
From: Nick Butcher <nickb_at_btinternet.com>
To: KeyStrk_at_Feist.Com
Still wrong:
select t.lname, t.fname, sum(v.balance_due) tot_bal_due
from the_table
where adult_ssn is not null
union
select ssn, balance_due
from the_table
where adult_ssn is null
) v, the_table t
where t.ssn = v.ssn
group by t.lname, t.fname
;
better than the function method though ;,)
Nick Received on Tue Dec 08 1998 - 00:05:31 CST