
Answer-first summary for fast verification
Answer: Use the TABLE_DATE_RANGE function
The correct answer is A. The TABLE_DATE_RANGE function in BigQuery is used to query multiple daily tables that span a specified date range. This function is useful for querying data that is partitioned by date and is designed to help you easily query across multiple tables without needing to write individual SELECT statements for each table.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You are leveraging the free integration feature between Firebase Analytics and Google BigQuery to monitor app events. This integration results in the automatic creation of new tables each day in BigQuery, with the naming format app_events_YYYYMMDD. Suppose you want to analyze data spanning the last 30 days. How would you query all of these daily tables from the past month using legacy SQL?
A
Use the TABLE_DATE_RANGE function
B
Use the WHERE_PARTITIONTIME pseudo column
C
Use WHERE date BETWEEN YYYY-MM-DD AND YYYY-MM-DD
D
Use SELECT IF.(date >= YYYY-MM-DD AND date <= YYYY-MM-DD