Question: Use OT database;- Database named OT which is based on a global fictitious company that sells computer hardware including storage, motherboard, RAM, video card, and



Use OT database;- Database named OT which is based on a global fictitious company that sells computer hardware including storage, motherboard, RAM, video card, and CPU. The company maintains the product information such as name, description standard cost, list price, and product line. It also tracks the inventory information for all products including warehouses where products are available. Because the company operates globally, it has warehouses in various locations around the world. The company records all customer information including name, address, and website. Each customer has at least one contact person with detailed information including name, email, and phone. The company also places a credit limit on each customer to limit the amount that customer can owe. Whenever a customer issues a purchase order, a sales order is created in the database with the pending status. When the company ships the order, the order status becomes shipped. In case the customer cancels an order, the order status becomes canceled. In addition to the sales information, the employee data is recorded with some basic information such as name, email, phone, job title, manager, and hire date.This database access is available to you in your login;- CUSTOMERS -CUSTOMERUD REGIONS REGIONO REGION NAME ADDRESS WEBSITE CREDIT_LIMIT CONTACTS - CONTACTO FIRST NAME LAST_NAME EMAIL PHONE CUSTOMERUD COUNTRIES COUNTRYO COUNTRY_NAME REGIONUO ORDERS ORDERO CUSTOMERUD STATUS SALESMANUD ORDER DATE EMPLOYEES EMPLOYEELD FIRST NAME LAST NAME EMAIL PHONE HIRE_DATE MANAGERD JOB_TITLE LOCATIONS -LOCATIONUD ADDRESS POSTAL CODE CITY STATE COUNTRY ORDER ITEMS ORDERO "ITEM_JD PRODUCT_ID QUANTITY UNT_PRICE INVENTORIES PRODUCTO - WAREHOUSE QUANTITY WAREHOUSES - WAREHOUSE_ID WAREHOUSE NAME LOCATIONUD PRODUCTS - PRODUCT JD PRODUCT_NAME DESCRIPTION STANDARD COST UST PRICE CATEGORY_ID PRODUCT_CATEGORIES CATEGORY_JD CATEGORY_NAME Advise for Assignment - Execute select * example -> select * from ot.orders; Query against each table shown in ER diagram above and scan data being displayed in output to understand the database before starting this assignment. Execute following queries on this OT database and paste Queries and their output screenshots. Marks distribution is given with each query. Query should be correct in order to get marks for output screenshot. Make sure to follow submission guidelines as -10% would be deducted for not following submission guidelines. 1. Create a view that selects customer details (Name & Address). Products ordered, Quantity ordered and total amount for all Cancelled' and 'Shipped' orders of 2016. (3 marks for Query+ 2 for output screenshot) [Hint;- total amount can be calculated using Quanity unit_price] 2. Using set Operations, list all the Product names which were ordered so far but also available in stock in any warehouse as well. Make sure product names are unique. (Query 3 Marks, Output sreenshot-2 marks) 3. Write a query to display number of customers who are served orders by each employee on each date. Make sure to display subtotals using all possible combinations using Grouping sets query. (3 query + 2 Output screenshot) 4. Write a Query to print all warehouses and their locations from 'Americas' or 'America Region sorted in descending order of warehouse name. (3 query +2 Output screenshot) 5. Write a Query to print Employee name with Total sale of each employees using Analytical Functions and display order information in result as well. Make sure to round off numbers to 2 decimal places. (3 query +2 Output screenshot) [Hint-total amount of each order can be calculated using Quanity*unit_price, which can be further used to calculate total and average sales] Use OT database;- Database named OT which is based on a global fictitious company that sells computer hardware including storage, motherboard, RAM, video card, and CPU. The company maintains the product information such as name, description standard cost, list price, and product line. It also tracks the inventory information for all products including warehouses where products are available. Because the company operates globally, it has warehouses in various locations around the world. The company records all customer information including name, address, and website. Each customer has at least one contact person with detailed information including name, email, and phone. The company also places a credit limit on each customer to limit the amount that customer can owe. Whenever a customer issues a purchase order, a sales order is created in the database with the pending status. When the company ships the order, the order status becomes shipped. In case the customer cancels an order, the order status becomes canceled. In addition to the sales information, the employee data is recorded with some basic information such as name, email, phone, job title, manager, and hire date.This database access is available to you in your login;- CUSTOMERS -CUSTOMERUD REGIONS REGIONO REGION NAME ADDRESS WEBSITE CREDIT_LIMIT CONTACTS - CONTACTO FIRST NAME LAST_NAME EMAIL PHONE CUSTOMERUD COUNTRIES COUNTRYO COUNTRY_NAME REGIONUO ORDERS ORDERO CUSTOMERUD STATUS SALESMANUD ORDER DATE EMPLOYEES EMPLOYEELD FIRST NAME LAST NAME EMAIL PHONE HIRE_DATE MANAGERD JOB_TITLE LOCATIONS -LOCATIONUD ADDRESS POSTAL CODE CITY STATE COUNTRY ORDER ITEMS ORDERO "ITEM_JD PRODUCT_ID QUANTITY UNT_PRICE INVENTORIES PRODUCTO - WAREHOUSE QUANTITY WAREHOUSES - WAREHOUSE_ID WAREHOUSE NAME LOCATIONUD PRODUCTS - PRODUCT JD PRODUCT_NAME DESCRIPTION STANDARD COST UST PRICE CATEGORY_ID PRODUCT_CATEGORIES CATEGORY_JD CATEGORY_NAME Advise for Assignment - Execute select * example -> select * from ot.orders; Query against each table shown in ER diagram above and scan data being displayed in output to understand the database before starting this assignment. Execute following queries on this OT database and paste Queries and their output screenshots. Marks distribution is given with each query. Query should be correct in order to get marks for output screenshot. Make sure to follow submission guidelines as -10% would be deducted for not following submission guidelines. 1. Create a view that selects customer details (Name & Address). Products ordered, Quantity ordered and total amount for all Cancelled' and 'Shipped' orders of 2016. (3 marks for Query+ 2 for output screenshot) [Hint;- total amount can be calculated using Quanity unit_price] 2. Using set Operations, list all the Product names which were ordered so far but also available in stock in any warehouse as well. Make sure product names are unique. (Query 3 Marks, Output sreenshot-2 marks) 3. Write a query to display number of customers who are served orders by each employee on each date. Make sure to display subtotals using all possible combinations using Grouping sets query. (3 query + 2 Output screenshot) 4. Write a Query to print all warehouses and their locations from 'Americas' or 'America Region sorted in descending order of warehouse name. (3 query +2 Output screenshot) 5. Write a Query to print Employee name with Total sale of each employees using Analytical Functions and display order information in result as well. Make sure to round off numbers to 2 decimal places. (3 query +2 Output screenshot) [Hint-total amount of each order can be calculated using Quanity*unit_price, which can be further used to calculate total and average sales]