英文:
Fetching person account related to a specific opportunity
问题
这是我的SOQL查询:
SELECT Id, Name, (SELECT Id, Name FROM Opportunities WHERE Id='{pv0}') FROM Account WHERE IsPersonAccount=True
它返回所有的个人账户,如何将其过滤为仅特定的机会记录?
英文:
I got an opportunity where I want to fetch the related person account on it
This is my soql:
SELECT Id, Name, (SELECT Id, Name FROM Opportunities WHERE Id='{pv0}') FROM Account WHERE IsPersonAccount=True
It returns all the Person Account, how can I filter it to just an specific opp record?
答案1
得分: 0
select id, name
from account
where id in (select accountid from opportunity where id='006...')
英文:
select id, name
from account
where id in (select accountid from opportunity where id='006...')
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论