Question: Employee ( Lastname , FirstName , MidInitial , gender, street, city) Works ( Lastname , FirstName , MidInitial , company-name , salary) company ( company-name

Employee (Lastname, FirstName, MidInitial, gender, street, city)

Works (Lastname, FirstName, MidInitial, company-name, salary)

company (company-name, city)

Manages(Lastname, FirstName, MidInitial, ManagerLastname, MFirstName, MMidInitial, start-date)

Table below shows the data to use.

Write SQL AND RA queries for the following:-

Q21. For each company, find minimum, average and maximum salaries of its managers.

Q22. For each company, compare minimum, average and maximum salaries for male and femaleemployees.

Q23. Some managers supervise several employees at different start dates. For those managers with several different start dates, find names and salaries of the employees with the first and the last start dates under him (or her). For example, for Pat Jason (who supervises five employees), you should return names and salaries for John Smith and Kim Jackson.

Q24. Write one good query by yourself to demonstrate your knowledge on SQL and RA. The query should use aggregate function(s). You should state the query in English in English first.

Employee (Lastname, FirstName, MidInitial, gender, street, city) Works (Lastname, FirstName, MidInitial, company-name,

salary) company (company-name, city) Manages(Lastname, FirstName, MidInitial, ManagerLastname, MFirstName, MMidInitial, start-date) Table

below shows the data to use. Write SQL AND RA queries for

the following:- Q21. For each company, find minimum, average and maximum salaries

LASTNAMEFIRSTNAMEMIDINITIALGENDERSTREETCITY 1 Anderson Susan 108th Omaha P street Lincoln 124th Omaha 2 Brady 3 Chen Peter Ann Mary Mary 4 Clemson Lincoln 5 Dale 6 Gill 132thOmaha P street Lincoln Old Mill Omaha 178th Omaha 8th Dodge Omaha 7 Harrison Susan 8 Jackson Kim 9 Jason 10 Kumar 11 Orr 12 Peterson Mike 13 Powell Tom 14 Quinn 15 Rand 16 Schreck Ann 17 Simon 18 Smith 19 Thomson Ron 20 Young 21 Wong 2 C.Bluffs Paul Susanne Omaha Blondo Omaha Broadway C.Bluffs 168stOmaha 13st 214st Elkhorn 77th 8th Farnam Omaha Dodge Omaha Broadway C.Bluffs Jacky Omaha Eric Lincoln John C.Bluffs Don Carole LASTNAMEFIRSTNAMEMIDINITIALGENDERSTREETCITY 1 Anderson Susan 108th Omaha P street Lincoln 124th Omaha 2 Brady 3 Chen Peter Ann Mary Mary 4 Clemson Lincoln 5 Dale 6 Gill 132thOmaha P street Lincoln Old Mill Omaha 178th Omaha 8th Dodge Omaha 7 Harrison Susan 8 Jackson Kim 9 Jason 10 Kumar 11 Orr 12 Peterson Mike 13 Powell Tom 14 Quinn 15 Rand 16 Schreck Ann 17 Simon 18 Smith 19 Thomson Ron 20 Young 21 Wong 2 C.Bluffs Paul Susanne Omaha Blondo Omaha Broadway C.Bluffs 168stOmaha 13st 214st Elkhorn 77th 8th Farnam Omaha Dodge Omaha Broadway C.Bluffs Jacky Omaha Eric Lincoln John C.Bluffs Don Carole

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!