Date range variable and BigQuery TABLE_DATE_RANGE

Hello all,

I want to query all my firebase events via bigquery (i’m quite new with bigquery), I can’t find how to make a query where a date range variable will impact the table_date_range of my query ?

Eg : working query in bigquery console :

SELECT, COUNT( as city_count FROM TABLE_DATE_RANGE([firebase-analytics-sample-data:android_dataset.app_events_], DATE_ADD('2017-06-19', -7, 'DAY'), CURRENT_TIMESTAMP()), TABLE_DATE_RANGE([firebase-analytics-sample-data:ios_dataset.app_events_], DATE_ADD('2017-06-19', -7, 'DAY'), CURRENT_TIMESTAMP()) GROUP BY ORDER BY city_count DESC

I want the date part ( DATE_ADD(‘2017-06-19’, -7, ‘DAY’), CURRENT_TIMESTAMP()) ) to be replaced by a {{checkout_date}} variable.

Any idea ?

Thanks for your work.

Up, I just want to know if it’s something possible actually or not :confused:

Thank you.