Write R code using R markdown to perform following SQL queries on the following database schema given below. The database consists of the following four tables,
Employee (person_name, street,city)
Works (person_name, companyname, salary)
Company (company_name, city)
Manages (person_name, manager_name)
a) Find the name and city of all employees who works for ABC Company?
b) Find the name and city of all employees who works for ABC Company and earn between $12,000 and $20,000?
c) Find the employee details who work and live in the different city for which they work?
d) Find the name of the employees who live in the same cities and same street as their manager?
e) Find all employees in the database who do not work for ABC Company?
f) Find all employees in the database who earn less than each employee of ABC Company?
g) Find all employees who earn less than average salary of all employees of their company?
h) Find the company that has less employees?
i) Find the company that has the highest payroll?
j) Find those companies whose employees earn a lowest salary on average than the average salary at ABC Company?
Answers
Answered by
1
Answer:
c is a correct answer
.......... .......
Similar questions