Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

9. Get job numbers for jobs whose city is first in the alphabetical list of the

ID: 3833494 • Letter: 9

Question

9. Get job numbers for jobs whose city is first in the alphabetical list of the job cities.

10. Increase the status values of suppliers by 5 who are located in Paris.

11. Change the name to ‘Hammer’ of parts that are Red and located in London and whose name was Screw.

12. Delete all jobs in Rome and all corresponding part shipments. (Please use 2 queries)

PROJECT enum iname city Sorter Paris Punch Rome j3 Reader Athens i4 Console Athens Collator London Terminal Oslo Tape London PART p num pname color weight city Nut Red 12 London P2 olt Green 17 Paris p3 Screw Blue 17 Rome p4 14 London Screw Red 12 Paris p5 Cam Blue p6 Cog Red 19 London SUPPLIER s, num s name status city S1 Smith 20 London S2 Jones 10 Paris S3 Blake 30 Paris 54 Clark 20 London S5 Adams 30 Athens SPJ Saenump num num qty 51 p 200 51 P1 i4 S2 p3 400 52 p3 12 200 S2 p3 200 S2 p3 D4 500 52 15 600 S2 p3 400 2 p 800 52 ps 12 100 S3 p3 200 p4 54 6 13 300 S4 p6 300 5 pl i4 100 55 2 12 200 55 4 A 800 5 p5 500 S5 p5 100 5 p6 12 200 5 500

Explanation / Answer

9. select j_num,city from project order by city;

This query retrieves the job number and its city in the alphabetical order.

10. select s_num, s_name, (status+ ((status*5)/100)) as increased_status from supplier where city='paris';

This query retrieves the supplier number,name and the increased status .

11. update part set pname='Hammer' where color='red' and city='London' and pname='Screw';

This query will update the name to hammer which is having part name screw and color is red and city is london.

12. delete * from part where city='Rome';

first query will delete parts from the part table where it belongs to city rome.

Second query deletes the jobs belongs to city rome