This one is a bit tricky. As some of the values in table1 will matches with the column header in table2 and record being group by ID, I tried with below query but failed:
TRANSFORM Persons
SELECT ID, City, Country
FROM Table1
GROUP BY ID, City, Country
PIVOT Group;