当 OwnerID 在 Property 中出现多次时,我试图从 Owner 获取 OwnerID、FName、LName。这是我尝试过的,但我对 sql 很陌生,所以我不知道这是否接近。
Select OwnerID, FName, LName
From Owner
Where OwnerID = (Select OwnerID
From Property
GROUP BY OwnerID
HAVING Count(*) >=2)