Lab Tutorial

134 views 8:47 am 0 Comments June 30, 2023
ITDA1001
Database Fundamentals
Tutorial – 7
March 2022

ITDA1001 Lab Tutorial 7
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
7.1 Retrieve the IDs and company names of all customers that have made more than 10
orders.
7.2 Retrieve all details of Orders administered by persons who hold the designation Sales
Representative and shipped by United Package.
7.3 Select the IDs and contact names of customers that have more orders than customer
‘BONAP’.
7.4 Retrieve the names of all employee. For each employee list the name of his/her manager
in adjacent columns.
7.5 Find out all the orders placed by all the customers.
7.6 Find out all the Orders processed by each Employee.
7.7 Display all customers details (who have placed orders and who have not placed orders)
and orders details which are placed by customers.
7.8 Find out all the customers and their orders and filter the result on customer’s city
(London).
7.9 Display all customers details (who have placed orders) and orders details which are placed
by customers.
Copyright © 2022 VIT, All Rights Reserved. 2

Tags: , , , , , , , , , , ,