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
Mohan Raj 33Mohan Raj 33 

on here how to join oppertunity?

public class Data{
    List<Account> Acclist{
        get{
            Acclist = [SELECT(SELECT LastName, Phone, Email FROM Account.Contacts)Name FROM Account];
    
    return Acclist;

    }
    set;
    }
   }
Best Answer chosen by Mohan Raj 33
JLA.ovhJLA.ovh
SELECT (SELECT LastName, Phone, Email FROM Account.Contacts),(Select Name,Amount from Opportunities),Name FROM Account

The above query is retrieving opportunities too