SQL ERROR #1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY q1a.client_id) AS f ON a.client_id = f.client_id WHERE (TO_' at line 37
in /var/www/vhosts/fabuloussavings.com/httpdocs/index.php on line 831.