Question
*OrderID Column is Orders table. CustomerID, CopmanyName, ContactName is Customers table. FirstName, LastName is Employees table. (NORTHWIND DB)* 10. Write a select query that lists
*OrderID Column is Orders table. CustomerID, CopmanyName, ContactName is Customers table. FirstName, LastName is Employees table. (NORTHWIND DB)*
10. Write a select query that lists the OrderID, CustomerID, CompanyName and ContactName , and the Employee's FirstName and LastName for all orders placed prior to September 1, 2020. Concatenate the Employee's FirstName and LastName in one column named "Employee Name. Sort the list by CompanyName. (Hint- You will need THREE tables.)
11. Write a select query that lists the CustomerID, CompanyName, and ProductName for all customers that have previously ordered a product that has been discontinued. (Hint - You will need FOUR tables.)
12. Use the UNION keyword to return two columns , CompanyName and Location. If the Country is USA the Location value should be Inside USAand if the Country is not USA, the Location value should be "Outside USA". (Hint - This requires the Customers table and a column alias.)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started