QuestionQ136
Executing queries using Databricks SQL and Databricks SQL WarehousesA data analyst must join the orders and customers tables using both customer_id and region_id as the join keys. The objective is to return only rows for which both values match across the two tables.
Which SQL query correctly carries out this join?
Choose two
- A SELECT * FROM orders INNER JOIN customers ON orders.customer_id = customers.customer_id;
- B SELECT * FROM orders INNER JOIN customers USING (customer_id, region_id);
- C SELECT * FROM orders INNER JOIN customers ON orders.customer_id = customers.customer_id AND orders.region_id = customers.region_id;
- D SELECT * FROM orders LEFT JOIN customers ON orders.customer_id = customers.customer_id AND orders.region_id = customers.region_id;
Community Discussion