Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

INF2007 Project Part 2: SQL

Due date: 21st April 2023 at 11:55PM (23:55)


Problem: Philamar Training provides business processes and information technology
training to various companies and organizations. Philamar employs trainers who work
with individual companies to determine training needs and then conduct the training.
Currently, Philamar keeps data on clients and trainers in two Word documents and two
Excel workbooks (see Tables below: Table a – d). Philamar also keeps track of which
clients are assigned to which trainers.
Each client is assigned to a single trainer, but each trainer might be assigned many
clients. Currently, clients BS27, FI28, and MC28 are assigned to trainer 42, Belinda
Perry. Clients CE16, CP27, FL93, HN83, and TE26 are assigned to trainer 48, Michael
Stevens. Clients EU28 and PS82 are assigned to trainer 53, Manuel Gonzalez.
Philamar has an additional trainer, Marty Danville, who has been assigned trainer
number 67, but has not yet been assigned any clients.

Instructions: Using the data shown in the Tables a-d above and the information
in the previous paragraph:
1. Create a Philamar database that will capture the information as presented
in the case study. For each query created, save the query with an
appropriate name. For example, a query to create the Trainer Table would
be called CreateTableTrainer.

2. Write SQL Queries to achieve the following:

a) For each client from Kingston, show the amount they have already paid. Save
the query as SelectQuery1
b) Show the total amount received from clients for each city. Take note of the
formatting as shown in the snapshot below. Save the query as SelectQuery2

c) Assuming each trainer works 5 hours in a day. How much does each Trainer
make in a day? A snapshot of the potential output is below. Save the query as
SelectQuery3

d) Increase the hourly rate of all trainees who live in the city Burdett or Camino by
20%. Save the query as SelectQuery4

e) Show all trainers and their associated clients (including those with no clients
yet) sorted by client name in descending order. Use the Join operator in your query.
See the output below and save the query as SelectQuery 5

-----------------------------------End of the Project-----------------------------------------

If the client table is not clear, here are their details

You might also like