Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Employees Not in Any Project | Nested Subqueries in the WHERE section
/
Generate Nested Subqueries in SQL
Sektion 1. Kapitel 7
single

single

bookChallenge: Employees Not in Any Project

Stryg for at vise menuen

Opgave

Swipe to start coding

Write a SQL query to list all employees who are not assigned to any project. Use a nested subquery with NOT IN to filter out employees who appear in the employee_projects table.

  • Select the employee_id, first_name, and last_name columns from the employees table.
  • Use a nested subquery in the WHERE clause to identify employee_id values that are present in the employee_projects table.
  • Exclude those employees from the results using NOT IN.
  • The query must return only those employees who are not assigned to any project.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 7
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

some-alt