AWS Certified Data Engineer Associate DEA-C01 Practice Question

An Amazon Athena query joins a large, 1 TB Parquet table named sales with a small, 50 MB CSV table named regions. The sales table is partitioned by order_date. The query must return last year's sales for the 'APAC' region but currently scans the entire sales table. Which SQL rewrite will most effectively reduce the amount of data scanned while returning the same result?

  • WITH filtered_sales AS ( SELECT * FROM sales WHERE order_date BETWEEN DATE '2023-01-01' AND DATE '2023-12-31' ) SELECT s.*, r.region_name FROM filtered_sales s JOIN regions r ON s.region_id = r.id WHERE r.region_name = 'APAC';

  • SELECT s.*, r.region_name FROM sales s JOIN regions r ON s.region_id = r.id WHERE r.region_name = 'APAC' AND s.order_date BETWEEN DATE '2023-01-01' AND DATE '2023-12-31';

  • SELECT r.region_name, s.* FROM regions r JOIN sales s ON s.region_id = r.id WHERE r.region_name = 'APAC' AND s.order_date BETWEEN DATE '2023-01-01' AND DATE '2023-12-31';

  • SELECT * FROM sales s WHERE order_date BETWEEN DATE '2023-01-01' AND DATE '2023-12-31' AND EXISTS (SELECT 1 FROM regions r WHERE r.id = s.region_id AND r.region_name = 'APAC');

AWS Certified Data Engineer Associate DEA-C01
Data Operations and Support
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot