2011-09-01 72 views

回答

0

它並沒有真正太大的意義是做利用窗口函數在同一時間聚集,所以我並不感到驚訝,你很困惑。在上例中,您可能想要將窗口移至外部查詢,即:

select 1, 2, 3, sum(sum4) over(partition by 3), ... 
from (
     select 1, 2, 3, sum(4) as sum4 
     from table 
     where filters 
     group by 1, 2, 3 
) x