Lag Window Functions gave me split rows
I am trying to use window functions for lag/lead. However no matter how I try, the table still show splits. lag(sum(case when `control or target` = 'target' then `vol_usd` else 0 end)) over (partition by year(`trade_date`)*100 + month(`trade_date`)) Is there anything wrong here?