1
select EnsureType(Avg(CAST(key AS Interval64)) OVER (), Interval64) from (select Interval64('P1D') as key);