Ultimate access to all questions.
A data engineer needs to analyze customer preferences and store sales by combining information from two distinct tables. The first table, named favorite_stores
, captures the relationship between customers and their preferred stores. The second table, named sales
, records the sales amounts associated with each store. Below are the tables used in this task:
Table 1: favorite_stores
store_id | customer_id |
---|---|
a1 | c1 |
a3 | c2 |
a4 | c3 |
Table 2: sales
store_id | sale_amount |
---|---|
a1 | 200 |
a2 | 150 |
a4 | 300 |
The data engineer executes the following SQL query to perform a left join between these tables:
SELECT favorite_stores.store_id, sales.sale_amount FROM favorite_stores LEFT JOIN sales ON favorite_stores.store_id = sales.store_id;
What will be the result set returned by this SQL query?