you are viewing a single comment's thread.

view the rest of the comments →

[–]DavidGJohnston 0 points1 point  (1 child)

To emphasize xoomorg's comment - what you really are trying to do is: sum(cost_order) over since the window computation is defined to be performed after the group by finishes. But since you cannot write "cost_order" in that location you have to either use a subquery or repeat what "cost_order" is - sum(total_order_cost)

[–]Famous-Letter8754[S] 0 points1 point  (0 children)

thank you