Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Filter Employees by Department Size | Nested Subqueries in the WHERE section
Generate Nested Subqueries in SQL
Seksjon 1. Kapittel 2
single

single

bookChallenge: Filter Employees by Department Size

Sveip for å vise menyen

Oppgave

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 employees table.
  • Use a nested subquery in the WHERE clause to find department_id values from the employees table that have more than 5 employees.
  • Return only employees whose department_id is in the set of departments with more than 5 employees.

Løsning

Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 2
single

single

Spør AI

expand

Spør AI

ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

some-alt