· 8 years ago · Jan 19, 2018, 09:00 PM
1/*
2Course: INFANL02-2 , Introduction to Database , 1718
3Assignment 2
4Student1: [Liam],[De waal] ; [0943700] , [Class INF1L]
5
6*/
7
8
9
10
11
12-- Question 1 : Give the list of teachers (name) and the name of the courses that they are teaching and the name of the courses that they are reviewing.
13-- Hint: There will be a list of teacher names (first and last), teaching courses, reviewing courses.
14-- write the query here
15
16/*
17select first_name, surname, name, review.coursecode
18from teacher, teaches, course, review
19Where teacher.bsn = teaches.teacherbsn and teaches.coursecode = course.code and teacher.bsn = review.teacherbsn
20Group by teacher.first_name, surname,name ,review.coursecode
21order by surname;
22*/
23
24
25-- Question 2: Give the list of students that completed their study programs together with their course points (sum of all the course points for each student).
26-- Hint: There will be a list with first name and last name of students and total points of courses that each student followed.
27-- write the query here
28
29/*
30select first_name, surname, SUM(points)
31from has_completed, student, teaches, course
32Where has_completed.student_id = student.id and teaches.studentid = has_completed.student_id and teaches.coursecode = course.code
33
34Group by first_name, surname, points
35order by surname
36*/
37
38
39-- Question 3: Give the list of courses (names) that teachers with maximum scale are teaching.
40-- write the query here
41
42/*
43select course.name
44from teacher, course, teaches
45where teacher.bsn = teaches.teacherbsn and course.code = teaches.coursecode and teacher.scale = 13
46
47Group by course.name
48*/
49
50
51
52-- Question 4: Give the list of students (names) and their assignments together with the number of prerequisites for each assignment.
53-- Hint: There will be a list of students names, code of the assignment, code of the course of the assignment, total number assignments that are required to do the assignment.
54-- write the query here
55
56/*
57select distinct first_name, surname, code, count(assignment.assignmentcode)
58from student, course, assignment, aregiven
59where course.code = assignment.coursecode and aregiven.assignmentcode = assignment.assignmentcode and student.id = aregiven.student_id
60group by first_name, surname, code
61order by first_name asc
62*/
63
64
65
66-- Question 5: Give a list of teachers (names) that are teaching courses, but do not work on assignments
67-- write the query here
68
69 /*
70 select first_name,surname
71from teacher, workson
72
73where bsn not in (select teacherbsn from workson)
74group by bsn
75order by bsn
76*/
77
78
79
80
81
82
83
84
85-- SQL commands to create tables
86-- write the commands here
87
88
89drop table if exists teacher Cascade;
90Create table teacher (bsn char(11) Primary key,
91 first_name varchar(12),
92 surname varchar (30),
93 scale int,
94 salary real,
95 check (scale >= 9 and scale <= 13),
96 check (salary >= 20*scale and salary <= 35*scale));
97
98drop table if exists course Cascade;
99Create table course (code char(5) Primary key,
100 name varchar(30),
101 points int,
102 Check (points >= 1 and points <= 12));
103
104Drop table if exists student Cascade;
105create table student (id char(7)Primary key,
106 first_name varchar(12),
107 surname varchar(30),
108 bsn char(11),
109 start_date date);
110
111
112Drop Table if exists designs Cascade;
113Create Table designs (teacherbsn char(11) References teacher(bsn),
114 coursecode char(5) References course(code),
115 Primary key (teacherbsn, coursecode));
116
117Drop Table if exists review Cascade;
118Create Table review (teacherbsn char(11) References teacher(bsn),
119 coursecode char(5) References course(code),
120 Primary key (teacherbsn, coursecode));
121
122Drop Table if exists teaches Cascade;
123Create Table teaches (teacherbsn char(11) References teacher(bsn),
124 coursecode char(5) References course(code),
125 studentid char(7) references student(id),
126 Primary key (teacherbsn, coursecode, studentid));
127
128drop table if exists assignment Cascade;
129Create table assignment (coursecode char(5) references course(code),
130 assignmentcode char(5),
131 week int,
132 year int,
133 final boolean,
134 Primary key (coursecode, assignmentcode));
135
136drop table if exists requires Cascade;
137Create table requires (cc1 char(5),
138 ac1 char(5),
139 cc2 char(5),
140 ac2 char(5),
141 Primary key (cc1, ac1, cc2, ac2),
142 Foreign key (cc1, ac1) references assignment(coursecode, assignmentcode),
143 Foreign key (cc2, ac2) references assignment(coursecode, assignmentcode));
144
145
146
147
148Drop type teacherrole Cascade;
149Create type teacherrole as enum ('designer', 'reviewer', 'solver');
150Drop table if exists workson cascade;
151Create table workson (teacherbsn char(11) references teacher(bsn),
152 coursecode char(5),
153 assignmentcode char(5),
154 role_of_teacher teacherrole,
155 primary key (teacherbsn, coursecode, assignmentcode),
156 Foreign key (coursecode, assignmentcode) references assignment(coursecode, assignmentcode));
157
158
159drop table if exists study_program cascade;
160Create table study_program (level char(3),
161 study_name varchar(45),
162 duration int,
163 Primary key (level, study_name));
164
165
166
167drop table if exists has_completed Cascade;
168Create table has_completed (student_id char(7),
169 study_level char(3),
170 study_name varchar(45),
171
172 primary key (student_id, study_level, study_name),
173 Foreign key (study_level, study_name) references study_program(level, study_name),
174 Foreign key (student_id) references student(id)
175 );
176
177drop table if exists aregiven;
178Create table aregiven (student_id char(7),
179 coursecode char(5),
180 assignmentcode char(5),
181
182 primary key(student_id, coursecode, assignmentcode),
183 Foreign key (coursecode, assignmentcode) references assignment(coursecode, assignmentcode),
184 Foreign key (student_id) references student(id));
185
186-- SQL commands to insert values
187-- write the commands here
188
189Insert Into teacher Values
190 ('52269-69987', 'Claudius', 'Streather', '10', '200'),
191 ('59614-58753', 'Dona', 'Milbank', '12', '380'),
192 ('25856-40101', 'Riley', 'Pugsley', '12', '272'),
193 ('98208-93540', 'Garwood', 'Hattrick', '11', '220'),
194 ('64756-68937', 'Juieta', 'Kunzelmann', '11', '354'),
195 ('61092-02471', 'Sallyanne', 'Delort', '13', '350'),
196 ('94203-26749', 'Leann', 'Kleinhaus', '11', '220'),
197 ('42374-12317', 'Leigha', 'Cianelli', '11', '220'),
198 ('83265-24378', 'Karel', 'Eisak', '11', '246'),
199 ('78910-58311', 'Tomi', 'Lowis', '10', '350');
200
201
202Insert Into student Values
203 ('0817347', 'Adelaide', 'Kemp', '55540-32016', '2012-02-29'),
204 ('0889300', 'Addison', 'Lewis', '62874-60266', '2012-11-14'),
205 ('0838756', 'Chandler', 'Mcgowan', '31573-29574', '2011-10-07'),
206 ('0832660', 'Averi', 'Horn', '57137-29593', '2013-01-28'),
207 ('0820356', 'Paola', 'Montoya', '92971-17968', '2010-11-29'),
208 ('0874162', 'Joslyn', 'Mann', '28097-88031', '2011-10-17'),
209 ('0855759', 'Mckenna', 'Hodge', '10062-01495', '2011-06-03'),
210 ('0861973', 'Ayanna', 'Everett', '72133-12008', '2013-01-07'),
211 ('0891964', 'Ruby', 'Snow', '29773-16346', '2011-12-18'),
212 ('0827171', 'Arya', 'Campos', '18120-95884', '2013-01-21'),
213 ('0886733', 'Yaretzi', 'Joseph', '88344-15559', '2010-10-21'),
214 ('0885275', 'Leah', 'Roman', '89744-83342', '2010-01-03'),
215 ('0837712', 'Corinne', 'Huffman', '66587-05136', '2011-04-03'),
216 ('0803756', 'Enrique', 'Tyson', '41401-89947', '2012-12-30'),
217 ('0832106', 'Holly', 'Kinney', '96961-48255', '2011-11-04'),
218 ('0871899', 'Jaxton', 'Huffman', '58680-81239', '2010-12-24'),
219 ('0834667', 'Leland', 'Mullen', '49088-99950', '2013-08-23'),
220 ('0848042', 'Quincy', 'Merritt', '13619-35297', '2010-11-07'),
221 ('0882325', 'Zara', 'Alford', '40831-15016', '2010-10-15'),
222 ('0891031', 'Samantha', 'Jackson', '24874-47775', '2012-09-13'),
223 ('0846211', 'Jaxen', 'James', '98978-28953', '2012-11-13'),
224 ('0853161', 'Jonas', 'Rivas', '47853-96551', '2012-03-10'),
225 ('0819175', 'Jaidyn', 'Clemons', '76470-06519', '2012-08-27'),
226 ('0839441', 'Ayleen', 'Lee', '29551-94776', '2010-12-19'),
227 ('0857631', 'Gauge', 'Stewart', '98473-70192', '2011-11-23'),
228 ('0857382', 'Bruce', 'Carey', '70786-61873', '2010-01-01'),
229 ('0816380', 'Amani', 'Love', '25672-23781', '2010-12-09'),
230 ('0808692', 'Taraji', 'Mills', '80141-75446', '2012-02-03'),
231 ('0875869', 'Keira', 'Byrd', '33465-41147', '2013-03-27'),
232 ('0800811', 'Deegan', 'Strong', '57118-37389', '2011-07-05'),
233 ('0838774', 'Marvin', 'Mcmahon', '39361-84625', '2010-09-14'),
234 ('0848415', 'Lindsay', 'Walker', '90980-43462', '2011-06-28'),
235 ('0840712', 'Alden', 'Ware', '11362-49381', '2013-03-19'),
236 ('0889517', 'Heaven', 'Brady', '04490-83342', '2010-05-13'),
237 ('0804162', 'Arabella', 'Villarreal', '19814-98358', '2011-02-26'),
238 ('0870247', 'Stephen', 'Roy', '74814-12661', '2011-10-11'),
239 ('0823855', 'Lukas', 'Ortega', '53365-11487', '2010-10-14'),
240 ('0885385', 'Rylie', 'Gill', '59235-16274', '2013-01-21'),
241 ('0852696', 'Keira', 'Owens', '40390-46701', '2011-04-29'),
242 ('0882301', 'Steven', 'Thompson', '50374-80378', '2012-09-15'),
243 ('0835161', 'Shelby', 'Buck', '71238-52210', '2011-04-14'),
244 ('0822564', 'Collin', 'Santos', '53223-20765', '2012-01-06'),
245 ('0821986', 'Zain', 'Nelson', '36805-56788', '2013-10-28'),
246 ('0812982', 'Juliana', 'Ewing', '40267-88898', '2010-11-14'),
247 ('0843262', 'Madison', 'Malone', '39761-44632', '2013-11-25'),
248 ('0805577', 'Aria', 'Serrano', '90238-09850', '2010-03-24'),
249 ('0845288', 'Willa', 'Vance', '02587-13960', '2013-03-23'),
250 ('0859163', 'Nathanael', 'Hood', '63909-93284', '2013-08-06'),
251 ('0810022', 'Jaidyn', 'Bond', '99102-95164', '2012-03-03'),
252 ('0857370', 'Milo', 'Pollard', '80725-49081', '2010-10-12');
253
254
255Insert Into course Values
256 ('CRS01', 'Programming Basics', '3'),
257 ('CRS02', 'OO Programming', '2'),
258 ('CRS03', 'Database Design', '3'),
259 ('CRS04', 'Software Testing', '3'),
260 ('CRS05', 'Modelling', '3'),
261 ('CRS06', 'Web Programming', '3'),
262 ('CRS07', 'Requirement Engineering', '4'),
263 ('CRS08', 'Operating Systems', '2'),
264 ('CRS09', 'Hardware Design', '3'),
265 ('PRJ01', 'Game Development', '4'),
266 ('PRJ02', 'Data Analysis Applications', '4'),
267 ('PRJ03', 'Simulators', '2'),
268 ('PRJ04', 'Mobile Apps', '3'),
269 ('PRJ05', 'Parallel Programming', '3'),
270 ('PRJ06', 'Advanced Technologies', '3');
271
272
273Insert Into assignment Values
274 ('CRS01', 'HMW37', '28', '2010', 'FALSE'),
275 ('CRS01', 'HMW54', '5', '2011', 'FALSE'),
276 ('CRS01', 'HMW41', '30', '2010', 'TRUE'),
277 ('CRS01', 'HMW44', '3', '2011', 'TRUE'),
278 ('CRS05', 'HMW39', '31', '2013', 'FALSE'),
279 ('CRS05', 'HMW03', '17', '2010', 'TRUE'),
280 ('CRS05', 'HMW66', '38', '2011', 'FALSE'),
281 ('CRS05', 'HMW99', '13', '2013', 'FALSE'),
282 ('PRJ01', 'HMW59', '36', '2012', 'TRUE'),
283 ('PRJ02', 'HMW59', '36', '2013', 'FALSE'),
284 ('PRJ01', 'HMW23', '13', '2012', 'FALSE'),
285 ('PRJ01', 'HMW04', '20', '2013', 'FALSE'),
286 ('PRJ04', 'HMW74', '18', '2012', 'FALSE'),
287 ('PRJ04', 'HMW13', '27', '2010', 'FALSE'),
288 ('PRJ04', 'HMW62', '14', '2010', 'FALSE'),
289 ('PRJ04', 'HMW78', '31', '2012', 'TRUE'),
290 ('PRJ04', 'HMW34', '24', '2010', 'TRUE'),
291 ('PRJ04', 'HMW55', '5', '2010', 'FALSE'),
292 ('PRJ04', 'HMW16', '26', '2012', 'FALSE'),
293 ('PRJ04', 'HMW77', '36', '2011', 'TRUE');
294
295
296Insert Into study_program Values
297 ('BSC', 'Informatica', '4'),
298 ('MSC', 'Informatica', '2');
299
300
301Insert Into teaches Values
302 ('52269-69987', 'CRS01', '0817347'),
303 ('59614-58753', 'CRS02', '0889300'),
304 ('25856-40101', 'CRS03', '0838756'),
305 ('98208-93540', 'CRS04', '0832660'),
306 ('64756-68937', 'CRS05', '0820356'),
307 ('61092-02471', 'CRS06', '0874162'),
308 ('94203-26749', 'CRS07', '0855759'),
309 ('42374-12317', 'CRS08', '0861973'),
310 ('83265-24378', 'CRS09', '0891964'),
311 ('78910-58311', 'PRJ01', '0827171'),
312 ('52269-69987', 'PRJ02', '0886733'),
313 ('59614-58753', 'PRJ03', '0885275'),
314 ('25856-40101', 'PRJ04', '0837712'),
315 ('98208-93540', 'PRJ05', '0803756'),
316 ('64756-68937', 'PRJ06', '0832106'),
317 ('52269-69987', 'CRS01', '0871899'),
318 ('59614-58753', 'CRS02', '0834667'),
319 ('25856-40101', 'CRS03', '0848042'),
320 ('98208-93540', 'CRS04', '0882325'),
321 ('64756-68937', 'CRS05', '0882325'),
322 ('64756-68937', 'CRS05', '0891031'),
323 ('61092-02471', 'CRS06', '0846211'),
324 ('94203-26749', 'CRS07', '0853161'),
325 ('42374-12317', 'CRS08', '0819175'),
326 ('83265-24378', 'CRS09', '0839441'),
327 ('78910-58311', 'PRJ01', '0857631'),
328 ('52269-69987', 'PRJ02', '0857382'),
329 ('59614-58753', 'PRJ03', '0816380'),
330 ('25856-40101', 'PRJ04', '0808692'),
331 ('98208-93540', 'PRJ05', '0875869'),
332 ('64756-68937', 'PRJ06', '0800811'),
333 ('52269-69987', 'CRS01', '0838774'),
334 ('59614-58753', 'CRS02', '0848415'),
335 ('25856-40101', 'CRS03', '0840712'),
336 ('98208-93540', 'CRS04', '0889517'),
337 ('64756-68937', 'CRS05', '0804162'),
338 ('61092-02471', 'CRS06', '0870247'),
339 ('94203-26749', 'CRS07', '0823855'),
340 ('42374-12317', 'CRS08', '0885385'),
341 ('83265-24378', 'CRS09', '0852696'),
342 ('78910-58311', 'PRJ01', '0882301'),
343 ('52269-69987', 'PRJ02', '0835161'),
344 ('59614-58753', 'PRJ03', '0822564'),
345 ('25856-40101', 'PRJ04', '0821986'),
346 ('98208-93540', 'PRJ05', '0812982'),
347 ('64756-68937', 'PRJ06', '0843262'),
348 ('52269-69987', 'CRS01', '0805577'),
349 ('59614-58753', 'CRS02', '0845288'),
350 ('25856-40101', 'CRS03', '0859163'),
351 ('98208-93540', 'CRS04', '0810022'),
352 ('64756-68937', 'CRS05', '0857370');
353
354
355Insert Into has_completed Values
356 ('0871899', 'BSC', 'Informatica'),
357 ('0834667', 'BSC', 'Informatica'),
358 ('0848042', 'BSC', 'Informatica'),
359 ('0882325', 'BSC', 'Informatica'),
360 ('0891031', 'BSC', 'Informatica'),
361 ('0846211', 'MSC', 'Informatica'),
362 ('0819175', 'MSC', 'Informatica'),
363 ('0839441', 'MSC', 'Informatica'),
364 ('0857631', 'MSC', 'Informatica'),
365 ('0857382', 'MSC', 'Informatica'),
366 ('0816380', 'MSC', 'Informatica'),
367 ('0808692', 'MSC', 'Informatica'),
368 ('0875869', 'MSC', 'Informatica'),
369 ('0800811', 'BSC', 'Informatica'),
370 ('0838774', 'BSC', 'Informatica'),
371 ('0848415', 'BSC', 'Informatica'),
372 ('0840712', 'MSC', 'Informatica'),
373 ('0889517', 'MSC', 'Informatica'),
374 ('0804162', 'MSC', 'Informatica');
375
376
377Insert Into review Values
378 ('94203-26749', 'CRS01'),
379 ('78910-58311', 'CRS02'),
380 ('61092-02471', 'CRS03'),
381 ('52269-69987', 'CRS04'),
382 ('59614-58753', 'CRS05'),
383 ('98208-93540', 'CRS06'),
384 ('59614-58753', 'CRS07'),
385 ('98208-93540', 'CRS08'),
386 ('83265-24378', 'CRS09'),
387 ('64756-68937', 'PRJ01'),
388 ('94203-26749', 'PRJ02'),
389 ('98208-93540', 'PRJ03'),
390 ('83265-24378', 'PRJ04'),
391 ('83265-24378', 'PRJ05'),
392 ('52269-69987', 'PRJ06');
393
394
395Insert Into designs Values
396 ('25856-40101', 'CRS01'),
397 ('25856-40101', 'CRS02'),
398 ('61092-02471', 'CRS03'),
399 ('94203-26749', 'CRS04'),
400 ('61092-02471', 'CRS05'),
401 ('52269-69987', 'CRS06'),
402 ('59614-58753', 'CRS07'),
403 ('25856-40101', 'CRS08'),
404 ('98208-93540', 'CRS09'),
405 ('64756-68937', 'PRJ01'),
406 ('78910-58311', 'PRJ02'),
407 ('83265-24378', 'PRJ03'),
408 ('42374-12317', 'PRJ04'),
409 ('98208-93540', 'PRJ05'),
410 ('94203-26749', 'PRJ06');
411
412
413Insert Into requires Values
414 ('CRS01', 'HMW37', 'CRS01', 'HMW44'),
415 ('CRS01', 'HMW54', 'CRS05', 'HMW39'),
416 ('CRS01', 'HMW41', 'CRS05', 'HMW03'),
417 ('CRS01', 'HMW44', 'CRS05', 'HMW66'),
418 ('CRS05', 'HMW39', 'CRS05', 'HMW99'),
419 ('CRS05', 'HMW03', 'PRJ01', 'HMW59'),
420 ('CRS05', 'HMW66', 'PRJ02', 'HMW59'),
421 ('CRS05', 'HMW99', 'PRJ01', 'HMW23'),
422 ('PRJ01', 'HMW59', 'PRJ01', 'HMW04'),
423 ('PRJ02', 'HMW59', 'PRJ04', 'HMW74'),
424 ('PRJ01', 'HMW23', 'PRJ04', 'HMW13'),
425 ('PRJ01', 'HMW04', 'PRJ04', 'HMW62'),
426 ('PRJ04', 'HMW74', 'PRJ04', 'HMW78'),
427 ('PRJ04', 'HMW13', 'PRJ04', 'HMW34'),
428 ('PRJ04', 'HMW62', 'PRJ04', 'HMW55'),
429 ('PRJ04', 'HMW78', 'PRJ04', 'HMW16'),
430 ('PRJ04', 'HMW34', 'PRJ04', 'HMW77');
431
432
433Insert Into aregiven Values
434 ('0817347', 'CRS01', 'HMW54'),
435 ('0817347', 'CRS01', 'HMW37'),
436 ('0817347', 'CRS01', 'HMW41'),
437 ('0817347', 'CRS01', 'HMW44'),
438 ('0820356', 'CRS05', 'HMW39'),
439 ('0820356', 'CRS05', 'HMW99'),
440 ('0820356', 'CRS05', 'HMW03'),
441 ('0820356', 'CRS05', 'HMW66'),
442 ('0827171', 'PRJ01', 'HMW04'),
443 ('0827171', 'PRJ01', 'HMW59'),
444 ('0827171', 'PRJ01', 'HMW23'),
445 ('0886733', 'PRJ02', 'HMW59'),
446 ('0837712', 'PRJ04', 'HMW13'),
447 ('0837712', 'PRJ04', 'HMW62'),
448 ('0837712', 'PRJ04', 'HMW77'),
449 ('0837712', 'PRJ04', 'HMW74'),
450 ('0837712', 'PRJ04', 'HMW34'),
451 ('0837712', 'PRJ04', 'HMW55'),
452 ('0837712', 'PRJ04', 'HMW16'),
453 ('0837712', 'PRJ04', 'HMW78'),
454 ('0871899', 'CRS01', 'HMW54'),
455 ('0871899', 'CRS01', 'HMW37'),
456 ('0871899', 'CRS01', 'HMW41'),
457 ('0871899', 'CRS01', 'HMW44'),
458 ('0882325', 'CRS05', 'HMW39'),
459 ('0882325', 'CRS05', 'HMW99'),
460 ('0882325', 'CRS05', 'HMW03'),
461 ('0882325', 'CRS05', 'HMW66'),
462 ('0891031', 'CRS05', 'HMW39'),
463 ('0891031', 'CRS05', 'HMW99'),
464 ('0891031', 'CRS05', 'HMW03'),
465 ('0891031', 'CRS05', 'HMW66'),
466 ('0857631', 'PRJ01', 'HMW04'),
467 ('0857631', 'PRJ01', 'HMW59'),
468 ('0857631', 'PRJ01', 'HMW23'),
469 ('0857382', 'PRJ02', 'HMW59'),
470 ('0808692', 'PRJ04', 'HMW13'),
471 ('0808692', 'PRJ04', 'HMW62'),
472 ('0808692', 'PRJ04', 'HMW77'),
473 ('0808692', 'PRJ04', 'HMW74'),
474 ('0808692', 'PRJ04', 'HMW34'),
475 ('0808692', 'PRJ04', 'HMW55'),
476 ('0808692', 'PRJ04', 'HMW16'),
477 ('0808692', 'PRJ04', 'HMW78'),
478 ('0838774', 'CRS01', 'HMW54'),
479 ('0838774', 'CRS01', 'HMW37'),
480 ('0838774', 'CRS01', 'HMW41'),
481 ('0838774', 'CRS01', 'HMW44'),
482 ('0804162', 'CRS05', 'HMW39'),
483 ('0804162', 'CRS05', 'HMW99'),
484 ('0804162', 'CRS05', 'HMW03'),
485 ('0804162', 'CRS05', 'HMW66'),
486 ('0882301', 'PRJ01', 'HMW04'),
487 ('0882301', 'PRJ01', 'HMW59'),
488 ('0882301', 'PRJ01', 'HMW23'),
489 ('0835161', 'PRJ02', 'HMW59'),
490 ('0821986', 'PRJ04', 'HMW13'),
491 ('0821986', 'PRJ04', 'HMW62'),
492 ('0821986', 'PRJ04', 'HMW77'),
493 ('0821986', 'PRJ04', 'HMW74'),
494 ('0821986', 'PRJ04', 'HMW34'),
495 ('0821986', 'PRJ04', 'HMW55'),
496 ('0821986', 'PRJ04', 'HMW16'),
497 ('0821986', 'PRJ04', 'HMW78'),
498 ('0805577', 'CRS01', 'HMW54'),
499 ('0805577', 'CRS01', 'HMW37'),
500 ('0805577', 'CRS01', 'HMW41'),
501 ('0805577', 'CRS01', 'HMW44'),
502 ('0857370', 'CRS05', 'HMW39'),
503 ('0857370', 'CRS05', 'HMW99'),
504 ('0857370', 'CRS05', 'HMW03'),
505 ('0857370', 'CRS05', 'HMW66');
506
507
508Insert Into workson Values
509 ('61092-02471', 'CRS01', 'HMW37', 'designer'),
510 ('25856-40101', 'CRS01', 'HMW54', 'solver'),
511 ('52269-69987', 'CRS01', 'HMW41', 'solver'),
512 ('94203-26749', 'CRS01', 'HMW44', 'designer'),
513 ('94203-26749', 'CRS05', 'HMW39', 'solver'),
514 ('98208-93540', 'CRS05', 'HMW03', 'reviewer'),
515 ('64756-68937', 'CRS05', 'HMW66', 'reviewer'),
516 ('78910-58311', 'CRS05', 'HMW99', 'solver'),
517 ('25856-40101', 'PRJ01', 'HMW59', 'designer'),
518 ('78910-58311', 'PRJ02', 'HMW59', 'reviewer'),
519 ('78910-58311', 'PRJ01', 'HMW23', 'designer'),
520 ('94203-26749', 'PRJ01', 'HMW04', 'designer'),
521 ('25856-40101', 'PRJ04', 'HMW74', 'solver'),
522 ('78910-58311', 'PRJ04', 'HMW13', 'solver'),
523 ('52269-69987', 'PRJ04', 'HMW62', 'reviewer'),
524 ('78910-58311', 'PRJ04', 'HMW78', 'solver'),
525 ('78910-58311', 'PRJ04', 'HMW34', 'designer'),
526 ('78910-58311', 'PRJ04', 'HMW55', 'designer'),
527 ('64756-68937', 'PRJ04', 'HMW16', 'designer'),
528 ('78910-58311', 'PRJ04', 'HMW77', 'reviewer');