Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
agaetisproject
Contributor III
Contributor III

Sum order lines amount by order

Hi all,

I have a file containing the following info

OrderID

OderLineDescription

OrderLineAmount

I would need to create an additional column in the script that aggregates the sum of all OrderLineAmount per Order ID to get the TotalOrderAmount

OrderID

OderLineDescription

OrderLineAmount

TotalOrderAmount


Could you please advise on the syntax?

sum(aggr(OrderLineAmount, OrderID)) as TotalOrderAmount


Many thanks!

0 Replies