Firebase exports daily tables app_events_YYYYMMDD to BigQuery. In legacy SQL, you need to query the past 30 days across those daily tables. What should you use?
Choose an answer
Tap an option to check your answer.
Correct answer: Use the TABLE_DATE_RANGE function.
Why this is the answer
The TABLEDATERANGE function is the correct and most efficient way to query multiple daily tables in legacy SQL. It allows you to specify a table prefix and a date range, and BigQuery automatically scans only the relevant tables. WHEREPARTITIONTIME is used with partitioned tables in standard SQL, not with daily tables in legacy SQL. Filtering with WHERE date BETWEEN YYYY-MM-DD AND YYYY-MM-DD or SELECT IF(date = YYYY-MM-DD AND date <= YYYY-MM-DD) would require you to manually construct a UNION ALL query for each table, which is inefficient and error-prone for a large number of tables.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed