Over window with groupby

2017-01-13 Thread Hongyuhong
Hi, I have a SQL like "select aser, sum(amount) over (rows 10 preceding) FROM OrderA group by aser" And it will fail with an error Expression 'amount' is not being grouped, But the attr 'amount' should not need to beging grouped, is that not support now? And I saw if I have no groupby it will g

Re: Over window with groupby

2017-01-15 Thread Hongyuhong
ich is the right rolling sum to include in the total? The answer is that it isn’t well-defined, therefore the query is not valid. > On Jan 13, 2017, at 5:52 PM, Hongyuhong wrote: > > Hi, > I have a SQL like > "select aser, sum(amount) over (rows 10 preceding) FROM OrderA g