Complete the code to select data only from the partition where the year is 2023.
SELECT * FROM sales_[1] WHERE year = 2023;
To prune partitions and query only the 2023 data, you must specify the partition with year 2023.
Complete the query to enable partition pruning by filtering on the partition key 'region'.
SELECT * FROM sales WHERE region = [1];String values in SQL must be enclosed in single quotes. Using 'North' filters the partition key correctly.
Fix the error in the query to enable partition pruning on the 'month' column.
SELECT * FROM sales WHERE month [1] 5;
Partition pruning requires a direct comparison operator like '=' to filter partitions effectively.
Fill both blanks to create a query that prunes partitions by year and region.
SELECT * FROM sales WHERE year = [1] AND region = [2];
Use 2023 for the year and 'East' (with quotes) for the region to prune partitions correctly.
Fill all three blanks to create a query that prunes partitions by year, region, and month.
SELECT * FROM sales WHERE year = [1] AND region = [2] AND month = [3];
Year and month are numbers, so no quotes. Region is a string and needs quotes.