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
Takk for tilbakemeldingene dine!
single
Challenge: Complex Assignment Matching
Sveip for å vise menyen
Sveip for å begynne å kode
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
Takk for tilbakemeldingene dine!
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår