Section 1. Chapitre 2
single
Challenge: Employee Salary Reporting with CTEs
Glissez pour afficher le menu
Tâche
Swipe to start coding
Write a query using a Common Table Expression (CTE) to produce a report of all employees whose salary is above the average salary of all employees in the company. The report must display each qualifying employee's first name, last name, department name, and salary.
- Use a CTE to calculate the average salary of all employees.
- Select only those employees whose salary is greater than the average salary calculated in the CTE.
- Display the employee's first name, last name, department name, and salary.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 2
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion