CS 346 – Database Management Systems Summer II 2017 Homework 4 sider the Customer Invoice database we have been using in class for practicing and ans ollowing questions. 1- Using JOIN, write the SQL statements that will generate the following reports:
As tables are not provided . I am assuming my own column names and table names. Please change with your respective column/table names to make it work
Select customer_code,customer_first_name,customer_last_name from Customer Where customer_code Not In (Select customer_code from Invoice)
Here i am.assuming that there will be entry in Invoice table only if customer ispurchasing something.
So inner query will return customer codes of customers who has purchased any product, and outer query will print only those customers who are not in the list returned by inner query.
Let me know in comments if you need anything