Partitioned SUM() fails with expression

Comments

1 comment

  • Avatar
    Larry Parker

    Same thing with partitioned AVG() and an expression, so I'm guessing this is a problem with window functions in general.

    --- Works
    AVG(r1_1."fact_sales_sales_amt") OVER (PARTITION BY r1_1."region__id") AS "gross_sales_avg"
    
    -- Does not work
    AVG(r1_1."fact_sales_sales_amt" - ABS(r1_1."fact_sales_tax_amt")) OVER (PARTITION BY r1_1."region__id") AS "net_sales_avg"
    
    0
    Comment actions Permalink

Please sign in to leave a comment.