184k views
5 votes
Your company is developing a new marketing campaign and wants to know which customers have never placed an order. You will need to join the Sales.Customers and Sales.Orders tables. You will need to look for customers where there is no corresponding matched row in the orders table. The best join to use for this task is the left join. From the Customers table retrieve the customer id, company name, contact name, country, and phone. Provide the full SQL statement for the answer

User Wes Winder
by
3.3k points

1 Answer

1 vote

Answer:

See explaination

Step-by-step explanation:

Using the left outer join:

select custid,companyname,contactname,country,phone from sales.customers left outer join sales.orders on sales.customers=sales.order;

User TheFogger
by
2.7k points