我有一个这样的结果集:
SELECT PropertyId, Owner from Table A
PropertyId Owner
1 Company A
1 Company B
I want to Pivot the result set like this:
PropertyId Owner 1 Owner 2
1 CompanyA Company B
换句话说,我希望每处房产都有 2 个所有者。假设每个属性最多有 2 个所有者。