The ‘Repairs’ database is for a computer repair store. It has four tables:
Devices (type, rate, priority)
Technicians (Id, name, grade)
Experience (Id, type, qualification)
Repair (Job, Id, type, owner, date, time, ready, cost)
Look in the Devices table and view the different types of repairs (MM stands
for Multimedia device, DD means disk drive). Each type of device has a repair
rate per ¼ hour spent on it, and a priority level of either low (L), medium (M),
or high (H).
The Technicians table lists the employees and their skill level.
The Experience table shows each technicians ability to repair different
devices (Novice (N) or Experienced (E)).
The Repair table gives each repair a unique job number, as well as other
Create and save SQL queries for the following:
1. Show the name and grade of all technicians
2. Show everything about all devices.
3. Show the different rates that are charged, from lowest to highest (no
4. Show all of the jobs (and the type) being worked on by technician
5. For all multimedia repairs, show the owner and the date of the job.
6. Show all of the jobs that have been around since before the 4th of June.
7. Show the different type of repairs that technician 1470 is working on
8. Show the different types of devices repaired and the rate charged for
9. What is the name of the technician with the ID 1310?
10. Which devices are charged at a rate of $30 per ¼ hour?
11. List the identity numbers of technicians who have expert qualifications.
12. Which devices are ready for collection?
13. What is the level of experience of technician 1470 when working on
14. Find the jobs being worked on by technicians 1470 and 1011.
15. The order of ANDs and ORs can affect the result. ANDs are always
worked out first. To make sure you get the result you expect, always
use brackets. For example, type the following two queries in and see
what difference the brackets make:
SELECT job, id, type
WHERE id=1470 OR id=1008
AND type=’iMac’ OR type=’MM’
SELECT job, id, type
WHERE (id=1470 OR id=1008)
AND (type=’iMac’ OR type=’MM’)
16. Show type, rate and priority of devices that have a rate of $20 or $25,
and are also either a multimedia device or a disk drive.
17. Show the owners and job dates of all repairs between June 4th and
18. Use the In operator to show the rates for input and output devices.
19. Show all of the owners with names beginning with ‘B’.
20. Show any five-letter technician names starting with ‘C’.
21. Show the number of hard drives being repaired.
22. Show the maximum time taken to repair each device type.
23. Edit the previous query to display the maximum time with the heading
“Maximum Time” and with the text “quarter hours” appended to the
values (e.g. ‘4 quarter hours’).
24. What is the average time each technician takes to complete a job?
25. Show the number of jobs entered on each date.
26. Show the type of devices that have exactly two jobs.
27. List the jobs that have a high priority.
28. Show the ID and name of technicians who are classed as experts.
29. Which high priority devices being worked on by Johnson are ready for
30. What is the date entered for all low priority repairs?
31. Show the device type and repair rate for devices that have technicians
who are novices.
32. Which technicians are experts at repairing iMacs?
33. What is the grade of the technician repairing the device owned by
34. What will be the charge for the repair to Elliot’s device?
35. Who owns devices being repaired by Ted Carrol?
36. What are the names of the technicians who are still not expert (N) at
37. What rate will Byrne be charged for repairs?
38. List the owners whose devices have a high priority for repair.
39. What level of qualification has the technician who is doing Taylor’s