Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

x-3+1, x23 Let f(x) = -*+3, * Answered: 1 week ago

Answered: 1 week ago

Question

1. Diagnose and solve a transfer of training problem.

Answered: 1 week ago