Specified table in the join statement

This fixes the integrity constraint violation: 1052.