
Answer-first summary for fast verification
Answer: Apply the `TABLE_DATE_RANGE` function to specify the date range.
The `TABLE_DATE_RANGE` function is the correct approach for querying data across a range of dates in legacy SQL, especially when dealing with tables named with a date suffix. This method efficiently scans the required tables without the need for manual table name concatenation or complex filtering. For more details, refer to the [BigQuery legacy SQL documentation](https://cloud.google.com/bigquery/docs/reference/legacy-sql).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
To analyze data from the past 30 days using Firebase Analytics integration with Google BigQuery, where daily tables are automatically created in the format app_events_YYYYMMDD, and the query must use legacy SQL, which method should you employ?
A
Utilize the WHERE_PARTITIONTIME pseudo column for filtering.
B
Apply the TABLE_DATE_RANGE function to specify the date range.
C
Filter data using a WHERE clause with date BETWEEN YYYY-MM-DD AND YYYY-MM-DD.
D
Use a SELECT IF statement to check if the date falls within the specified range.
No comments yet.