Sección 1. Capítulo 2
single
Challenge: Filter Employees by Department Size
Desliza para mostrar el menú
Tarea
Swipe to start coding
Write a SQL query to list all employees who work in departments that have more than 5 employees. Use a nested subquery in the WHERE clause to identify departments meeting this size requirement.
- Select all columns from the
employeestable. - Use a nested subquery in the WHERE clause to find
department_idvalues from theemployeestable that have more than 5 employees. - Return only employees whose
department_idis in the set of departments with more than 5 employees.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 2
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla