I have the following Query
[Select Supplier__c, Avg(Total_Sales__c) from Submittal group by Supplier__c order by Purchase_Date__c DESC]
The issue is that I only want to include the latest 10 records in my average total sales calculation. Is such a thing possible? It must be done with SOQL, not Apex as querying all the submittals will be way over the limit for query rows returned.