Added join table in the sql