the employee table containing five columns - "Id","Name", "Salary","Designation" and "Experience" in the format given below. Write a query to display the names of employees who are having more than 5 years of experience over the average experience of all the employees and whose salary is greater than 25000. Display the result by sorting the records based on the Id of employees in the asending order. The code should run on Mysql. Employee:-
the employee table containing five columns - "Id","Name", "Salary","Designation" and "Experience" in the format given below. Write a query to display the names of employees who are having more than 5 years of experience over the average experience of all the employees and whose salary is greater than 25000. Display the result by sorting the records based on the Id of employees in the asending order. The code should run on Mysql. Employee:-
Database Systems: Design, Implementation, & Management
12th Edition
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Carlos Coronel, Steven Morris
Chapter8: Advanced Sql
Section: Chapter Questions
Problem 52P
Related questions
Question
Consider the employee table containing five columns - "Id","Name", "Salary","Designation" and "Experience" in the format given below. Write a query to display the names of employees who are having more than 5 years of experience over the average experience of all the employees and whose salary is greater than 25000. Display the result by sorting the records based on the Id of employees in the asending order. The code should run on Mysql.
Employee:-
Column | Type |
Id | int(10) |
Name | varchar(20) |
Salary | int(20) |
Designation | varchar(20) |
Exp_In_Years | Decimal(3,2) |
Sample Input:-
Employee
Id | Name | Salary | Designation | Exp_In_Years |
101 | Rajesh | 13000 | System Engg | 3 |
102 | Pritam | 5000 | System Engg | 5 |
104 | Ramesh | 40000 | Manager | 10 |
105 | John | 30000 | Lead | 15 |
106 | Anjali | 20000 | IT Analyst | 10 |
103 | Sudeep | 10000 | Lead | 8 |
107 | Vicky | 80000 | Lead | 20 |
Sample output:- Vicky
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning