Question
Write RA, Relational Algebra, query for each of the following. (Be sure to solve using Relational Algebra) Employee ( person_name, street, city) Works (person_name, company_name,
Write RA, Relational Algebra, query for each of the following.
(Be sure to solve using Relational Algebra)
Employee ( person_name, street, city)
Works (person_name, company_name, salary)
(a) Assume the companies may be located in several cities. Find all companies located in every city in which Union Pacific (UP) is located.
(b) Find the company with the smallest number of employees. [Note: The query should return the name of the company which has the smallest number of employees.]
(c) Find the company with the largest payroll. [Note: Payroll is the sum of salaries for all employees. The query should return the name of the company which has the largest payroll.]
(d) Find those companies whose employees earn a higher salary, on average, than the average salary at First Bank Corporation.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started