Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Over function has been achieved the function: to use over the function reach the intersection

I think the result of the need to:

I think the result of the need to Picture 2 cross-cutting sum

select shipper.trans_no,
       shipper_line.part_id as customer_id,
       shipper_line.quantity,
       shipper.trans_date,
       shipper_line.unit_price,
       shipper_line.line_no,
       shipper_line.all_amt,
       sum(shipper_line.all_amt) over (partition by shipper_line.part_id order by shipper.trans_date
                                       rows between unbounded preceding and current row) as shipper_allamt         
from   
       shipper join shipper_line on (shipper.trans_no=shipper_line.trans_no)
where  shipper.trans_date between '2013-10-01' and '2013-10-30'

asked 16 Nov '13, 22:33

mfkpie8's gravatar image

mfkpie8
273667175
accept rate: 12%

edited 16 Nov '13, 22:40

What is your question?

(17 Nov '13, 03:22) Mark Culp
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×24

question asked: 16 Nov '13, 22:33

question was seen: 1,411 times

last updated: 17 Nov '13, 03:22