12:02 + < Back Assignment.docx ☺ Branch Registration BRANCH 9 MOTOR WA IN RE Staff HESS PA M SA Then A M BA MO Client CU
Posted: Wed Apr 27, 2022 3:32 pm
12:02 + < Back Assignment.docx ☺ Branch Registration BRANCH 9 MOTOR WA IN RE Staff HESS PA M SA Then A M BA MO Client CUENE NAMENEM 50 CAN he RTY MARE Property For Rent POINT CTYOST NE viagne de lu RA way Figure 1: list of tables Note: _: Primary Key * : Foreign Key Write an SQL query to create a table "REGISTRATION as shown in Fig. 1, make sure it satisfies all the referential integrity constraints.
12:021 Back Assignment.docx Write an SQL query to insert a new tuple into a branch table where branch is located in Kuala Lumpur with B017 and in street '08 Jalan Gombak' with postcode JG53100 mi. Write an SQL query to delete all those tuples from BRANCH where city name contains ris" Write an SQL query to retrieve the Branchno, total number of staff working in each branch from staff table. Write an SQL query to update increase) the salary of those staff by 500 whose position is manger in STAFF table.
12:02 Back Assignment.docx vi.Write an SQL query to retrieve the details of all the staff from STAFF table who are not "male" and are not 'managers vii. Write an SQL query: from each branch with more than 1 member of staff, find the number of staff in each branch and their sum of their salaries and sort by branch no. se nested queries/subqueries vii. Write an SQL query to delete tuple in the PROPERTYFORRENT table where property is in city "Aberdeen' staff salary is equal to 9000. it. Write an SQL to retrieve the frame, Iname, position, salary of those staff who are working in city London or Glasgow Write an SQL query to update the DATEJOINED to 31-DEC-99 in Registration Table where registration is handled by the staff name as "Ann Beech and client PREFTYPE is "House'.
Branch Registration BIANCHINO STREET CITY POSTCODE 3005 22 Deer Rd London 5W14EH QUENTNO BRANCHNO STAFENO" DATEJOINED B007 15 Argyll St Aberdeen AB2350 CR76 BOOS 5141 3003 02-JAN-01 163 Main St Glasgow G11 SOX CRSG 3003 5637 B004 32 Manse Rd Bristol B599 INZ CR74 11.APR 00 16- NOV.99 8003 SG 56 Cover Dr London B002 Staff NW10 6EU CR62 3007 SAS 07-MAR- STAFRNO FNAME UNAME POSTION SEX DOB SALAHY BRANCHNO 5121 John White Manager M 01-OCT-45 30000 3005 SG37 Ann Beech F 10-NOV-60 12000 Assistant Supervisor B003 5614 David Ford M 24-MAR-58 35000 B003 SAS Mary Howe Assistant F 19-FEB-70 9000 3007 SGS Brand Manager F 03-JUN-10 24000 Susan Jutie 6003 SL41 Lee Assistant F 13-JUN-65 9000 BOOS Client CLIENTNO FNAME LNAME TELNO PREFTYPE MAXRENT CR76 John Kay 0171-774-5632 Flat 425 CRSS Aline 0141-841-1825 Fiat 350 Steward Ritchie CR74 Mile 01475-39217 House 750 CR62 Mary Tregear 01224-196720 Flat 600 5
CR76 John Kay 0171-774-5632 Flat 425 CR56 Aline Steward 0141-848-1825 Flat 350 CR74 Mike Ritchie 01475-392178 House 750 CR62 Mary Tregear 01224-196720 Flat 600 PropertyForRent PROPERTYNO STREET CITY POSTCODE TYPE ROOMS RENT OWNERNO STAFFNO BRANCHNO PA14 16 Holhead Aberdeen AB755U House 6 650 0045 SAS 0007 PL94 6 Argylist London NW2 Fiat 4 400 COR SL41 B005 PG4 6 Lawrence St Glasgow G11 90X Flat 3 350 0040 SG14 8003 2 Manor Rd 692 40x PG 36 Fiat 3 375 C093 SG 1003 Glasgow Glasgow PG21 G12 18 Dale Rd House 5 SA 600 3003 COR 4 G12 SAX Flat 450 0093 S614 PG16 5 Novar Dr 3003 Glow Figure 1: list of tables Note: : Primary key 1: Foreign Key
12:021 Back Assignment.docx Write an SQL query to insert a new tuple into a branch table where branch is located in Kuala Lumpur with B017 and in street '08 Jalan Gombak' with postcode JG53100 mi. Write an SQL query to delete all those tuples from BRANCH where city name contains ris" Write an SQL query to retrieve the Branchno, total number of staff working in each branch from staff table. Write an SQL query to update increase) the salary of those staff by 500 whose position is manger in STAFF table.
12:02 Back Assignment.docx vi.Write an SQL query to retrieve the details of all the staff from STAFF table who are not "male" and are not 'managers vii. Write an SQL query: from each branch with more than 1 member of staff, find the number of staff in each branch and their sum of their salaries and sort by branch no. se nested queries/subqueries vii. Write an SQL query to delete tuple in the PROPERTYFORRENT table where property is in city "Aberdeen' staff salary is equal to 9000. it. Write an SQL to retrieve the frame, Iname, position, salary of those staff who are working in city London or Glasgow Write an SQL query to update the DATEJOINED to 31-DEC-99 in Registration Table where registration is handled by the staff name as "Ann Beech and client PREFTYPE is "House'.
Branch Registration BIANCHINO STREET CITY POSTCODE 3005 22 Deer Rd London 5W14EH QUENTNO BRANCHNO STAFENO" DATEJOINED B007 15 Argyll St Aberdeen AB2350 CR76 BOOS 5141 3003 02-JAN-01 163 Main St Glasgow G11 SOX CRSG 3003 5637 B004 32 Manse Rd Bristol B599 INZ CR74 11.APR 00 16- NOV.99 8003 SG 56 Cover Dr London B002 Staff NW10 6EU CR62 3007 SAS 07-MAR- STAFRNO FNAME UNAME POSTION SEX DOB SALAHY BRANCHNO 5121 John White Manager M 01-OCT-45 30000 3005 SG37 Ann Beech F 10-NOV-60 12000 Assistant Supervisor B003 5614 David Ford M 24-MAR-58 35000 B003 SAS Mary Howe Assistant F 19-FEB-70 9000 3007 SGS Brand Manager F 03-JUN-10 24000 Susan Jutie 6003 SL41 Lee Assistant F 13-JUN-65 9000 BOOS Client CLIENTNO FNAME LNAME TELNO PREFTYPE MAXRENT CR76 John Kay 0171-774-5632 Flat 425 CRSS Aline 0141-841-1825 Fiat 350 Steward Ritchie CR74 Mile 01475-39217 House 750 CR62 Mary Tregear 01224-196720 Flat 600 5
CR76 John Kay 0171-774-5632 Flat 425 CR56 Aline Steward 0141-848-1825 Flat 350 CR74 Mike Ritchie 01475-392178 House 750 CR62 Mary Tregear 01224-196720 Flat 600 PropertyForRent PROPERTYNO STREET CITY POSTCODE TYPE ROOMS RENT OWNERNO STAFFNO BRANCHNO PA14 16 Holhead Aberdeen AB755U House 6 650 0045 SAS 0007 PL94 6 Argylist London NW2 Fiat 4 400 COR SL41 B005 PG4 6 Lawrence St Glasgow G11 90X Flat 3 350 0040 SG14 8003 2 Manor Rd 692 40x PG 36 Fiat 3 375 C093 SG 1003 Glasgow Glasgow PG21 G12 18 Dale Rd House 5 SA 600 3003 COR 4 G12 SAX Flat 450 0093 S614 PG16 5 Novar Dr 3003 Glow Figure 1: list of tables Note: : Primary key 1: Foreign Key