Reference no: EM133569907
Tutorial - 3
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
Retrieve the IDs and company names of all customers that have made more than 10 orders.
Retrieve all details of Orders administered by persons who hold the designation Sales Representative and shipped by United Package.
Select the IDs and contact names of customers that have more orders than customer ‘BONAP'.
Retrieve the names of all employee. For each employee list the name of his/her manager in adjacent columns.
Find out all the orders placed by all the customers.
Find out all the Orders processed by each Employee.
Display all customers details (who have placed orders and who have not placed orders) and orders details which are placed by customers.
Find out all the customers and their orders and filter the result on customer's city (London).
Display all customers details (who have placed orders) and orders details which are placed by customers.