使用SQL,我想只提取今天10天以及去年(同一周)减去10天的数据。
见下面的思考过程:
WHERE
(report_date BETWEEN current_date AND current_date(-10)) OR
(report_date BETWEEN current_date(-365) AND current_date(-375))
谢谢!
答案 0 :(得分:0)
尝试:
WHERE
(report_date BETWEEN current_date - 10 AND current_date)
OR
(report_date BETWEEN current_date - 375 AND current_date - 365)