Postgresql Window Function Partition By Interval