I need them in MS SQL please Tables (1) (2) CustOrder OrderNo OrderDate PromiseD
ID: 3753430 • Letter: I
Question
I need them in MS SQL please
Tables
(1)
(2)
CustOrder OrderNo OrderDate PromiseDate ShippedDate ShippingTerm SalesID CID 1000 7/14/2017 8/14/2017 7/24/2017 3 1003 4140 1001 1/2/2018 2/2/2018 3/2/2018 1 1003 1110 1002 12/21/2017 1/21/2018 12/31/2017 1 1003 2120 1003 8/22/2017 9/22/2017 10/22/2017 2 1007 1110 1004 1/10/2018 2/10/2018 2/10/2018 7 1007 3130 1005 1/11/2018 2/11/2018 1/31/2018 1 1007 4140 1006 2/11/2018 3/11/2018 1/31/2018 2 1009 4140 1009 4/30/2018 5/30/2018 4/25/2018 1 1015 5155 1010 5/31/2018 6/30/2018 5/21/2018 1 1015 5155 1011 5/31/2018 6/30/2018 5/21/2018 1 1015 5150 1012 9/15/2018 10/15/2018 7 1001 9120 1014 9/12/2018 10/12/2018 2 1011 7170 1016 8/31/2018 1 1003 9140 7 List SalesID and Name for sales representatives who have NOT dealt with any customer orders. Hint: Use a NOT IN operator and a nested SQL statement]. Name your SQL statement under the name Query7, then copy your query and its results into the Word document under the subheading Query7.Explanation / Answer
Ans:
Select SalesID,Name from SalesRep where SalesID NOT IN (Select SalesID from CustOrder);
Explaination:
Select SalesID from CustOrder this query will give all the salesID which is in CustOrder Table.
Select SalesID,Name from SalesRep where SalesID NOT IN (Select SalesID from CustOrder); This Query will give all SalesID and Name which not present in SalesRep Table
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.