Try
$_collection = Mage::getModel('sales/order')->getCollection();
$_collection->getSelect()
->reset(Zend_Db_Select::COLUMNS)
->columns('customer_id')
->columns('SUM(base_grand_total) AS total_sales')
->order('total_sales')
->group('customer_id')
->limit(10);
or
/**
* Get the resource model
*/
$resource = Mage::getSingleton('core/resource');
/**
* Retrieve the read connection
*/
$readConnection = $resource->getConnection('core_read');
$query = 'SELECT customer_id,SUM(base_grand_total) AS total_sales
FROM sales_flat_order
GROUP BY customer_id
ORDER BY total_sales DESC
LIMIT 10;';
/**
* Execute the query and store the results in $results
*/
$results = $readConnection->fetchAll($query);
See https://stackoverflow.com/questions/5790811/aggregate-functions-in-magento-orm