I have scenario where 'Client' Entity linked to 'Location Address' Entity. There is a 'Is this current location address' option set field in Location Address entity. For 'Client' Entity Records the 'Is this current address' field is marked Yes for multiple location addresses. So i have to fire a query that calculates the persons records having multiple location addresses marked as yes.
Following is the SQL query for the same.
select mcg_name, count(mcg_isthiscurrentrecord) from mcg_client, mcg_locationaddress where mcg_client.mcg_clientid = mcg_locationaddress.mcg_clientid and mcg_isthiscurrentrecord=1 group by mcg_name having count(mcg_isthiscurrentrecord) > 1
I want an Fetchxml query for the same. Please help me out
Thanks in advance !!!