0% found this document useful (0 votes)
145 views

Database Assessment Questions Revised PDF

This document provides instructions for a database assessment assignment in the COMP636 course. It includes details on downloading the necessary database files, loading the data, and contains 10 questions to answer by writing SQL queries. Marks are allocated to each question, with the total marks for the assignment being 25. Students are instructed to record their answers on a provided answer sheet and submit it by the given deadline.

Uploaded by

giri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
145 views

Database Assessment Questions Revised PDF

This document provides instructions for a database assessment assignment in the COMP636 course. It includes details on downloading the necessary database files, loading the data, and contains 10 questions to answer by writing SQL queries. Marks are allocated to each question, with the total marks for the assignment being 25. Students are instructed to record their answers on a provided answer sheet and submit it by the given deadline.

Uploaded by

giri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

COMP636: Database Assessment Questions

Due: 5pm, 26th March 2021

Worth: These exercises are worth 20% of the marks for COMP 636

Exercise Preparation

Download the COMP636DatabaseExerciseAnswerSheet from the COMP636 Learn@Lincoln site.

Download the northwind.sql and northwind-data.sql file from the COMP636 Learn@Lincoln site.

Load the northwind database and then the northwind-data.sql into your AWS RDS MySQL
Environment, note that these scripts may take 15 mins to execute.

The script creates a database with the tables and relationships shown below, it also loads data into
the tables. A larger version of this schema is provided as a PDF download also.

For each of the questions below, create and execute a query to return the information requested.

In the answer document, place the SQL for the query along with the number of rows returned when
it is executed or the actual rows returned depending on the question (requirement indicated on
answer sheet)
1. List all the orders that contain discontinued products.

2. The number of purchased orders placed with each supplier. The result should show the
company name and the number of orders placed.

3. The dollar ($) value of largest discount offered on an order (order_details)

4. All of the products where the units on order are less than the re-order level

5. A list of all the unique product_names (Product) supplied by each company (suppliers)

6. The five suppliers who the most money is spent with?

7. Which is the largest purchase order placed ($ value)?

8. List all the suppliers that were bought from in 1997.

9. List the total quantity of products that are purchased, sold or on hold (transaction type).
Output the product ID, Quantity and Transaction Type

10. Identify the employee who places the largest number of purchase orders.

Question 4 - A product is on order where there is a purchase_order_detail entry that does not have a
date_received set.

Question 5 - This should for each supplier list the products they supply. This needs to be determined
from products, purchase_order_details, purchase_orders & suppliers. Do not use supplier_ids in the
products table.

Question 6 & 7 - The value of each purchase order needs to be calculated from the
purchase_order_details table not the payment _amount in the purchase_orders table.

Question 10 - The employee placing the purchase_order is the one identified in the 'created_by' field.
Mark Allocation
Question Number Marks Allocated
1 1
2 2
3 1
4 2
5 2
6 4
7 4
8 3
9 4
10 2

Total Marks available 25.

Submission:

Use the Answer Sheet provided on the COMP636 Learn @ Lincoln site to record your answers.

Upload this sheet via the submission link on the COMP 636 Learn @ Lincoln site.

The final submission time for these exercises is 5pm on 15th January 2021.

You might also like