• Thanks for the DDL but it is not syntactically correct.

    There are misssing columns from table1 (PCount), you are not specifiying enough columns in the union for the results table.

    But from looking at the requirements it would seem you need an outer join and join the tables together.