Re: SQL Query
Date: 22 Oct 2002 10:16:43 -0700
Message-ID: <54dc4b2a.0210220916.5e42edbe_at_posting.google.com>
Thanks this solution gets me a step closer, but now consider the following:
buy_currency sell_currency buy_amount sell_amount
JPY USD 100. 1.00 USD JPY 2.00 200. JPY EUR 200. 100.
After summing and grouping, the organized result should be: currency buy_amt sell_amt
JPY 300. 200. EUR 0. 100. USD 2.00 1.00
Also, can this query be executed from within Oracle8i sql?
Thanks.
A
Ban Spam <ban-spam_at_operamail.com> wrote in message news:<Xns92A99E687C6BESunnySD_at_68.6.19.6>...
> gavspp_at_yahoo.com (gavs) wrote in
> news:54dc4b2a.0210160800.64c6c327_at_posting.google.com:
>
> > Hello:
> >
> > I need help with formulating a sql query without using temporary tables:
> >
> > table A contains the following columns:
> >
> > buy_currency sell_currency buy_amount sell_amount
> > JPY USD 100. 1.00
> > USD JPY 2.00 200.
> >
> >
> > The final answer should be:
> > currency buy_amt sell_amt
> > JPY 100. 200.
> > USD 2.00 1.00
> >
> > The actual query will be a sum of all currencies grouped by currency.
> >
> > Any suggestions will be helpful.
> >
> > Thanks.
> > AG
>
> What is the due date for turning in this assignment?
Received on Tue Oct 22 2002 - 19:16:43 CEST