You can use GENERATE_DATE_ARRAY()
and UNNEST()
:
(您可以使用GENERATE_DATE_ARRAY()
和UNNEST()
:)
SELECT dte, t.ended, t.package
FROM (select t,
GENERATE_DATE_ARRAY(t.purchased, t.ended, interval 1 week) as dtes
from (select date('2019-01-01') as purchased, date('2019-02-01') as ended, '1MOnth' as package
) t
) t CROSS JOIN
UNNEST(t.dtes) dte
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…