Sektion 1. Kapitel 12
single
Challenge: Complex Assignment Matching
Stryg for at vise menuen
Opgave
Swipe to start coding
Write a SQL query that joins four tables to produce a full assignment report.
Table relationships:
-
assignments.employee_id→employees.employee_id -
assignments.project_id→projects.project_id -
projects.department_id→departments.department_id -
Start your query from the
assignmentstable -
Perform 3 consecutive
JOINs in the following order:assignments→employeesassignments→projectsprojects→departments
-
Return exactly four columns with these aliases:
assignment_id— fromassignmentsemployee_name— fromemployees.nameproject_name— fromprojectsdepartment_name— fromdepartments
-
Use
table.columnnotation when referencing all columns
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 12
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