Lab-1

Find the names of all employees who work for First Bank Corporation.

000 per annum. Find the names. and cities of residence of all employees who work for First Bank Corporation and earn more than $10. street address.Find the names and cities of residence of all employees who work for First Bank Corporation. .

Find the names of all employees in this database who live in the same city as the company for which they work. Find the names of all employees who live in the same city and on the same street as do their managers. .

Find all companies located in every city in which Small Bank Corporation is located. Find the names of all employees who earn more than every employee of Small Bank Corporation.Find the names of all employees in this database who do not work for First Bank Corporation. . Assume the companies may be located in several cities.

Find the company with the smallest payroll. .Lab-2 Find the company with the most employees.

on average.Find those companies whose employees earn a higher salary. . than the average salary at First Bank Corporation.

person
 where accident. Select count (distinct name)
 from accident.driver-id
 and date between date ’1989-00-00’ and date ’1989-12-31’ .report-number and participated.Lab-3 Find the total number of people who owned cars that were involved in ac.driver-id = person.report-number = participated. participated.cidents in 1989.

’Berkeley’) insert into participated
 select o. 4007.driver-id. person
 where participated. insert into accident values (4007. car c
 where p.report-number) Add a new accident to the database. assume any values for required attributes.name = ’John Smith’
 and accident.driver-id = o.model = . select count (distinct *) from accident
 where exists (select *
 from participated.license.driver-id and person. owns o. ’2001-09-01’.name = ’Jones’ and p.license = c.driver-id and o.license and c.report-number = participated. 3000
 from person p.Find the number of accidents in which the cars belonging to “John Smith” were involved. c.driver-id = person.

’Toyota’ Delete the Mazda belonging to “John Smith”. delete car
 where model = ’Mazda’ and license in 
 (select license
 from person p.driver-id) 
 Update the damage amount for the car with license number“AABB2000” in 
the accident with report number “AR2197” to $3000. 
 update participated
 set damage-amount = 3000
 where report-number = “AR2197” and driver-id in 
 (select driver-id
 from owns
 where license = “AABB2000”) .driver-id = o. owns o
 where p.name = ’John Smith’ and p.