SELECT generate_series(1,12) AS month;
SELECT generate_series(1,12,1) AS month;
SELECT generate_series(‘2020-01-01'::DATE,‘2020-12-31'::DATE,‘1 month'::INTERVAL) AS first_of_month;
补充:PostgreSQL使用generate_series函数 填充数据(插入数据)
select x, y, generate_series(-1,1) as x_g, value from test_mov_avg