One of the many recent announcements from BigQuery team regarding new functionality, was the ability to now manipulate dates with a simple + or - operator.
The amount of times I find my self writing report_date BETWEEN DATE_SUB('2020-11-16', INTERVAL 90 DAY) AND '2020-11-16'
is way more than I would like.
The new functionality means that for manipulating the date in DAY
interval, the DATE_SUB
or DATE_ADD
is simply replaced by '2020-11-16' - 90
QueryStash
Created: Nov 17th 2020