On Wed, Mar 18, 2020, 12:55 PM Michael Lewis wrote:
> work_type.work_type_key = work_type.work_type_key
>
> You've done a cross join.
>
You meant to do permitted_work.work_type_key = work_type.work_type_key I
expect
>
The three types of thing (permitted_work; employee; work_type) don’t stand in a
1:1 relationship with each other. You might have multiple work_types or
permitted_work for each employee, I’m guessing.
Each existing combination produces one row in the result. So an employee with
three permitted_w
work_type.work_type_key = work_type.work_type_key
You've done a cross join.