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
Mahmoud Coudsi 1Mahmoud Coudsi 1 

Error: Compile Error: Illegal assignment from List<AggregateResult> to List<Account> at line 2 column 19

I'm getting this error message when trying to save this Apex class (embbeded SOQL query). 

User-added image

Any solutions ? 
sfdcMonkey.comsfdcMonkey.com
hi Mahmoud Coudsi 
try this onces
List<Labs__c>acts = []... in line nuber 2 insteadof List<account> acts

i hop it helps you
let me inform if it helps you and mark it best answer
Thanks
shravanshravan
SOQL aggregate functions return AggregateResult but list<sobject>. Please find the more info about aggegated function.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_SOQL_agg_fns.htm