Layouting; duplicate check (add involvement) with SQL query