Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

10. write a SQL query to find those employees who work either in department 70 or 90. Return full name (first and last name), department

image text in transcribed

10. write a SQL query to find those employees who work either in department 70 or 90. Return full name (first and last name), department id. 11. write a SQL query to find those employees who work under a manager. Return full name (first and last name), salary, and manager ID 12. write a SQL query to find employees whose first names contain the letters D,S, or N. Sort the result-set in descending order by salary. Return all fields. 13. Write a SQL query to find those employees whose first name contains a character ' s ' in the third position. Return first name, last name and department id 14. write a SQL query to find those employees who worked more than two jobs in the past. Return employee id. 15. write a SQL query to count the number of employees, the sum of all salary, and difference between the highest salary and lowest salaries by each job id. Return job_id, count, sum, salary difference. 16. write a SQL query to find each job ids where two or more employees worked for more than 300 days. Return job id 17. write a SQL query to count the number of cities in each country. Return country ID and number of cities. 18. write a SQL query to count the number of employees worked under each manager. Return manager ID and number of employees. 19. write a SQL query to find all jobs. Sort the result-set in descending order by job title. 20. write a SQL query to calculate the average salary of employees who receive a commission percentage for each department. Return department id, average salary. 21. Write a SQL query to find the departments where any manager manages four or more employees. Return department id. 22. write a SQL query to compute the average salary of each job ID. Exclude those records where average salary is higher than 8000 . Return job ID, average salary. 23. Write a SQL query to find those job titles where maximum salary falls between 12000 and 18000 (Begin and end values are included.)

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