select "calender_week" as "week",
avg("column2") as "avg"
from testTable
where
to_char(calender_week, 'MM')::int between to_char(to_date('01-MAY-2019', 'DD-MON-YYYY'), 'MM')::int -4 , to_char(to_date('01-MAY-2019', 'DD-MON-YYYY'), 'MM')::int
group by calender_week
1条答案
按热度按时间guicsvcw1#
请使用下面的查询,