Question
SUBJECT SQL Thanks. 1.Write a query, using a join, to display the customers company name, orders order date, and the employees last name for all
SUBJECT SQL
Thanks.
1.Write a query, using a join, to display the customers company name, orders order date, and the employees last name for all orders in the orders table.
2. Write a query, using a join, to display the orders order date, the orders details quantity, and the products product name for all orders in the orders table
3. Write a query, using a join, to display the products product name, the categorys category name, and the sum of all the order details quantity for all the orders in the order details table. Base the summation on product name and the category name. Sort the results from highest summation value to the lowest summation value.
4. Write a query, using a join, to display the employees last name, the territorys territory description, and the regions region description for each employee in the employee table. Sort the results by the employees last name.
5.Use a UNION operator to generate a result set consisting of two columns from the Suppliers table: CompanyName, and Country. If the vendor is in USA, the country value should be USA; otherwise, the country value should be Outside USA. Sort the final result set by country.
Categories CategoryID CategoryName Description Picture Order Details 9 Order 8 ProductID UnitPrice Quantity Discount - CustomerCustomer Demo Customer 8 CustomerTypeID Customers 8 Customer Company Name Contact Name Contact Title Orders y Order Customer Address - Employees ? Employeeld LastName First Name City Region Postal Code Country Phone CustomerDemographics ? CustomerTypelo CustomerDesc Products ProductD EmployeeID OrderDate RequiredDate Shipped Date Ship Via Freight Ship Name ShipAddress Ship City Ship Region Ship Postal Code Ship Country Title TitleOfCourtesy BirthDate HireDate Address City OC Fax Suppliers 8 Suppliers Company Name Contact Name Contact Title Address City Region Postal Code Country Product Name Supplier CategoryID QuantityPerunit UnitPrice kos Region Postal Code Units in Stock Units OnOrder ReorderLevel Country Homcf hot Exclension Phone Photo Discontinued Fax HomePage Shippers ShipperID Company Name Phone Notes Reports To Photo Path
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