Forum Moderators: open
HOW...can i use this to also query how many were entered on each of the past 7 days, by each agent....
is that possible?
$sql = 'SELECT nhm_associate, COUNT(nhm_associate) AS totalcount, (SELECT COUNT(*) FROM registration_table WHERE DATE_SUB(CURDATE(),INTERVAL 7 DAY) <= entry_time) AS weekscount FROM registration_table WHERE DATE_SUB(CURDATE(),INTERVAL 7 DAY) <= entry_time GROUP BY nhm_associate';