Sektion 2. Kapitel 7
single
Challenge: Employees Without Projects
Stryg for at vise menuen
Opgave
Stryg for at begynde at kode
Write a SQL query to list all employees who are not assigned to any project.
- Use the
employeesandassignmentstables. - Select
employee_idandnamefrom theemployeestable. - Use a
LEFT JOINonemployee_idto include all employees regardless of whether they have an assignment. - Filter results using
WHERE a.assignment_id IS NULLto keep only employees with no matching row inassignments.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 2. Kapitel 7
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat