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

Help with SOQL query

I'm trying to fetch opportunities with the opp owner's full name


List<Opportunity> opps = [SELECT Amount, CloseDate, (SELECT Fullname, Id from User where Id = :OwnerId)
            FROM Opportunity
            LIMIT 100];

 I know my query is wrong, but it may help explain what I'm trying to achieve.

Best Answer chosen by Admin (Salesforce Developers) 

List<Opportunity> opps = [select amount, closeDate, Owner.Name from Opportunity limit 100]