PrepAway - Latest Free Exam Questions & Answers

Which SQL statement will produce the desired list?

Given an EMPLOYEES table and a SALES table, a user wants to produce a list of all employees
and their associated revenue, even if no revenue exists. Which SQL statement will produce the
desired list?

PrepAway - Latest Free Exam Questions & Answers

A.
SELECT employees.name, sales.revenue
FROM employees
INNER JOIN sales ON employees.id = sales.emp_id

B.
SELECT employees.name, sales.revenue
FROM employees
INNER JOIN sales ON sales.emp_id = employees.id

C.
SELECT employees.name, sales.revenue
FROM sales
LEFT OUTER JOIN employees ON employees.id = sales.emp_id

D.
SELECT employees.name, sales.revenue
FROM sales
RIGHT OUTER JOIN employees ON employees.id = sales.emp_id

Explanation:

One Comment on “Which SQL statement will produce the desired list?


Leave a Reply