<?php
$topscollection_data = array();
		$topscollection_data["selectList"] = array(
		"subtype" => "sql",
		"sql" => "SELECT 
    DATE(pay_date) AS pay_date,
    `user`,
    SUM(amount) AS total_amount
FROM collections
GROUP BY DATE(pay_date), `user`
ORDER BY DATE(pay_date), `user`;
"
	);
		$tables_data["collection data"][".operations"] = &$topscollection_data;
?>