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

Home -> Community -> Usenet -> c.d.o.tools -> Re: help with a query

Re: help with a query

From: TurkBear <noone_at_nowhere.com>
Date: Wed, 10 Jan 2001 16:00:10 -0600
Message-ID: <lmmp5toill37i2dbj288k5ofm76tc3blps@4ax.com>

If I remember this correctly:

at sqlplus prompt enter
compute sum of sales on report
break on Year_of_sale

select to_char(date,'YYYY') Year_of_sale,sum(sales) group by to_char(date,'YYYY');

javadrink_at_my-deja.com wrote:

>Hi,
>
>Hope someone can help me with a query:
>
>I have the following table: table1, with 2 columns: sales, date
>
>what I want to do is:
>
>select and add the value of sales based on date:
>
>i.e.
>result will be:
>
>(sales in year 1998), (sales in 1999), (sales in 2000), (total sale)
>
>Can I do it in ONE query?
>
>Thanks a lot!
>
>
>
>Sent via Deja.com
>http://www.deja.com/
  Received on Wed Jan 10 2001 - 16:00:10 CST

Original text of this message

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