Reference no: EM133569906
Task 1: Using Northwind Database, write SQL statements for the following data retrieval operations.
Note: You may need to refer to the schema for the exact field names while framing the queries to the following questions. While framing the question, the words ‘code', ‘number' or ‘ID' may have been synonymously used. For instance, ‘Customer Number' when used may refer to a field called CustomerID. Similarly, wherever the word ‘name' is used, appropriate interpretation may be needed based on the schema - for instance if ‘customer name' is required to be printed, you may need to retrieve CompanyName field from the Customers Table; likewise, when ‘employee name' is required (without any further qualification, you may retrieve the lastname field of Employees table.
Exercise
List all details of Customers with the output presented in descending order of Company names.
Use Alias for each few columns of Customers and display Customers details.
Using "BETWEEN" Display product details having inventory of more than 100 and less than 120.
Display all details of customers having contact name starting with letter ‘r' or ending with ‘er'
Display the list of products that should be re-order.
List out only 5 percentage of total records from customers table.
Retrieve the Customer IDs and contact names of all customers who have yet to order any products.
Display product details which are ordered atleast once and having inventory of more than 100
List CustomerID and Company Name, those had orders in past having shipment postal code 50739.
Retrieve the details of all Products' having the word "lager" in the product label.
List all Orders (Order number and date) of the orders made by the Customer "Thomas Hardy". Note:
Thomas Hardy is the name of the contact person.