thanks a lot,steven,david :-)
在 5/5/17 13:14, Steven Chang 写道:
> Hello,
>
> Official document in
> https://www.postgresql.org/docs/9.3/static/functions-window.html says
> so :
> An aggregate used with ORDER BY and the default window frame
> definition produces a "running sum" type of behavior, which may or may
> not be what's wanted. To obtain aggregation over the whole partition,
> omit ORDER BY or use ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED
> FOLLOWING
winston , regards