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

Home -> Community -> Usenet -> c.d.o.misc -> SQL question!

SQL question!

From: Violin <violin.hsiao_at_mail.pouchen.com.tw>
Date: Thu, 22 Oct 1998 06:18:49 GMT
Message-ID: <3630ce44.2165033@news.twsc.pouchen.com.tw>


Hello,
I have a SQL question.

I have a table "PAY" and the colums:
PAY_NO PAY_DATE VEN_NO PAY_AMT


000001     19981001       A01           5000.00
000002     19981002       A02           3500.50
000003     19981005       A06                 1820  
000004     19981006       A02           6300.25
  ::::::::::::::::::;

I want to have a list order by sum(pay_amt) where pay_date >= '19981001' and <= '19981031' and show all rownum, like this:

ROWNUM VEN_NO YYMM TOTAL


                   1    A02           199810    9800.75
                   2    A01           199810    5000.00
                   3    A06           199810    3000.50
                   4   :::::::::::::::::::::::

So,I can know in '199810',No.1 is 'A02' and sum(pay_amt) is 9800.75, No.2 is 'A02' and total is 5000..........  

Maybe you know how to create the SELECT statement. I'll appreciate for your help.
Thank you in advance.
Please Cc to: violin.hsiao_at_mail.pouchen.com.tw

Violin. Received on Thu Oct 22 1998 - 01:18:49 CDT

Original text of this message

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