function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
penchala rajupenchala raju 

can i fetch two contacts and opportunites records of particular Account object using SOQL

Yes, you can do this via a sub query using the relationship name
select Id
        select Name
        from Contacts
        selet Name
        from Opportunities
from Account
where Id = 'xxxxxx'

rajesh gandirajesh gandi
in Soql we are using sub query up to 5 times