1. Salesforce Apex Developer Guide, "Writing SOQL Queries": This guide explicitly states the possible return types for a SOQL query. "A SOQL query can return: A single sObject, A list of sObjects, An integer for queries that use the COUNT() function." This directly supports the selection of sObject, List, and Integer.
2. Salesforce Apex Developer Guide, "Working with SOQL Aggregate Functions": This section clarifies that aggregate functions like SUM() or AVG() return a List. It details how to access the calculated value from this list, demonstrating that the direct return type is not a primitive like Double. For example: AggregateResult[] groupedResults = [SELECT AVG(Amount) FROM Opportunity]; Object avgAmount = groupedResults[0].get('expr0');