A data engineer is using Amazon Redshift to aws video

 ·  PT1H46M27S  ·  EN

data-engineer video for a data engineer is using Amazon Redshift to analyze sales data for a large e-commerce platform. The sales data is stored in a table

Full Certification Question

A data engineer is using Amazon Redshift to analyze sales data for a large e-commerce platform. The sales data is stored in a table called sales_data. The table contains the following columns: order_id: Unique identifier for each order customer_id: Unique identifier for each customer order_date: The date when the order was placed order_amount: The total amount of the order The engineer needs to retrieve the total sales amount per customer for the year 2024 , including customers who made no purchases during that year. The initial query is written as follows: SELECT customer_id, SUM(order_amount) AS total_sales FROM sales_data WHERE EXTRACT(YEAR FROM order_date) = 2024 GROUP BY customer_id; However, the result is missing customers who did not place orders in 2024, and the engineer wants those customers included with a total_sales value of 0. How should the data engineer modify the Redshift query to ensure it includes all customers, even those with no sales in 2024?