MumbaiDelhiSELECT `id`, `location`, `INBOUND_GRP`, `AFTR_HRS_STATUS`, `MQT_STATUS`, `INBOUND_NO_ANSWERED_STATUS`, `Out_Bound_GROUP`, `Out_Bound_Calls_Answered_STATUS`, `TMR1_STATUS`, `ADVISOR_GRP` FROM `Call_Center_EOD_GROUP_PROFILE` WHERE `location` ='Mumbai' ; SELECT count( * ) as cnt FROM `vicidial_closer_log` WHERE campaign_id in ('IN_METRO','AGENTDIRECT','VIP_Group') AND call_date >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ) AND call_date <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) Array ( [cnt] => 1596 ) 1596REPLACE INTO `Call_Center_EOD_Report`(`location_id`, `report_date`, `report_type`, `report_value`, `cdate`, `priority` ) VALUES ('Mumbai', date_format(subdate(now(),1),'%Y-%m-%d') , 'Total Call Volumes Inbound', '1596', now(), 1 ); SELECT count( * ) as cnt FROM `vicidial_closer_log` WHERE campaign_id in ('IN_METRO','AGENTDIRECT','VIP_Group') AND STATUS in ('afthrs') AND call_date >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ) AND call_date <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) REPLACE INTO `Call_Center_EOD_Report`(`location_id`, `report_date`, `report_type`, `report_value`, `cdate`, `priority` ) VALUES ('Mumbai', date_format(subdate(now(),1),'%Y-%m-%d') , 'Total Calls After Working Hours', '54', now(), 2 ); REPLACE INTO `Call_Center_EOD_Report`(`location_id`, `report_date`, `report_type`, `report_value`, `cdate`, `priority` ) VALUES ('Mumbai', date_format(subdate(now(),1),'%Y-%m-%d') , 'Total Call in Working Hours', '1542', now(), 3 ); SELECT count( * ) as cnt FROM `vicidial_closer_log` WHERE campaign_id in ('IN_METRO','AGENTDIRECT','VIP_Group') AND status in ('DROP' , 'QUEUE' , 'TIMEOT') AND call_date >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ) AND call_date <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) REPLACE INTO `Call_Center_EOD_Report`(`location_id`, `report_date`, `report_type`, `report_value`, `cdate`, `priority` ) VALUES ('Mumbai', date_format(subdate(now(),1),'%Y-%m-%d') , 'Missed Calls,Queue,Time out', '250', now(), 4 ); SELECT count( * ) as cnt FROM `vicidial_closer_log` WHERE campaign_id in ('IN_METRO','AGENTDIRECT','VIP_Group') AND status IN ('N') AND call_date >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ) AND call_date <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) REPLACE INTO `Call_Center_EOD_Report`(`location_id`, `report_date`, `report_type`, `report_value`, `cdate`, `priority` ) VALUES ('Mumbai', date_format(subdate(now(),1),'%Y-%m-%d') , 'IN Bound (No Answerd)', '16', now(), 5 ); REPLACE INTO `Call_Center_EOD_Report`(`location_id`, `report_date`, `report_type`, `report_value`, `cdate`, `priority` ) VALUES ('Mumbai', date_format(subdate(now(),1),'%Y-%m-%d') , 'Calls Handled (Answerd)', '1276', now(), 6 ); REPLACE INTO `Call_Center_EOD_Report`(`location_id`, `report_date`, `report_type`, `report_value`, `cdate`, `priority` ) VALUES ('Mumbai', date_format(subdate(now(),1),'%Y-%m-%d') , 'Abd %', '16.21%', now(), 7 ); SELECT count( * ) as cnt FROM vicidial_log WHERE campaign_id IN ('METRO') AND STATUS IN ( 'ok', 'CALLBK', 'INCALL', 'HV' ) AND call_date >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ) AND call_date <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) REPLACE INTO `Call_Center_EOD_Report`(`location_id`, `report_date`, `report_type`, `report_value`, `cdate`, `priority` ) VALUES ('Mumbai', date_format(subdate(now(),1),'%Y-%m-%d') , 'Out Bound Calls Answered', '1086', now(), 8 ); SELECT count( * ) as cnt FROM vicidial_log WHERE campaign_id IN ('METRO') AND call_date >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ) AND call_date <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) REPLACE INTO `Call_Center_EOD_Report`(`location_id`, `report_date`, `report_type`, `report_value`, `cdate`, `priority` ) VALUES ('Mumbai', date_format(subdate(now(),1),'%Y-%m-%d') , 'Out Bound Drop', '242', now(), 9 ); select sum(length_in_sec) as length_in_sec from vicidial_closer_log WHERE campaign_id in ('IN_METRO','AGENTDIRECT','VIP_Group') AND call_date >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ) AND call_date <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) select count(*) as cnt from vicidial_closer_log WHERE campaign_id in ('IN_METRO','AGENTDIRECT','VIP_Group') AND call_date >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ) AND call_date <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) REPLACE INTO `Call_Center_EOD_Report`(`location_id`, `report_date`, `report_type`, `report_value`, `cdate`, `priority` ) VALUES ('Mumbai', date_format(subdate(now(),1),'%Y-%m-%d') , 'AHT (In Seconds) Inbound (In Sec)', '183', now(), 10 ); select sum(length_in_sec) as length_in_sec from vicidial_log WHERE campaign_id IN ('METRO') AND call_date >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ) AND call_date <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) and STATUS IN('ok', 'CALLBK', 'INCALL', 'HV') SELECT count( * ) as cnt FROM vicidial_log WHERE campaign_id IN ('METRO') AND call_date >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ) AND call_date <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) AND STATUS IN ( 'ok', 'CALLBK', 'INCALL', 'HV' ) REPLACE INTO `Call_Center_EOD_Report`(`location_id`, `report_date`, `report_type`, `report_value`, `cdate`, `priority` ) VALUES ('Mumbai', date_format(subdate(now(),1),'%Y-%m-%d') , 'AHT (In Seconds) Outbound (In Sec)', '106', now(), 11 ); select count(*) as cnt from vicidial_closer_log where call_date >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ) AND call_date <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) and campaign_id in ('IN_METRO','AGENTDIRECT','VIP_Group') and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND','MAXCAL'); SELECT count(*) as cnt from vicidial_closer_log where campaign_id in ('IN_METRO','AGENTDIRECT','VIP_Group') AND call_date >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ) AND call_date <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) and queue_seconds <= 20 and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND','MAXCAL') REPLACE INTO `Call_Center_EOD_Report`(`location_id`, `report_date`, `report_type`, `report_value`, `cdate`, `priority` ) VALUES ('Mumbai', date_format(subdate(now(),1),'%Y-%m-%d') , 'TMR1 (Answered within 20 seconds)', '29%', now(), 12 ); select count(*) as cnt from vicidial_closer_log where campaign_id in ('IN_METRO','AGENTDIRECT','VIP_Group') AND call_date >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ) AND call_date <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) and (queue_seconds > 0); REPLACE INTO `Call_Center_EOD_Report`(`location_id`, `report_date`, `report_type`, `report_value`, `cdate`, `priority` ) VALUES ('Mumbai', date_format(subdate(now(),1),'%Y-%m-%d') , 'Total Calls That entered Queue', '83%', now(), 13 ); select sum(queue_seconds) as queue_seconds from vicidial_closer_log where campaign_id in ('IN_METRO','AGENTDIRECT','VIP_Group') AND call_date >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ) AND call_date <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) and (queue_seconds > 0); select count(*) as cnt from vicidial_closer_log where campaign_id in ('IN_METRO','AGENTDIRECT','VIP_Group') AND call_date >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ) AND call_date <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) and (queue_seconds > 0); REPLACE INTO `Call_Center_EOD_Report`(`location_id`, `report_date`, `report_type`, `report_value`, `cdate`, `priority` ) VALUES ('Mumbai', date_format(subdate(now(),1),'%Y-%m-%d') , 'Average QUEUE Length for queue calls ( In Sec)', '61.08', now(), 14 ); SELECT COUNT(distinct phone_number) as counts FROM vicidial_closer_log where campaign_id in ('IN_METRO','AGENTDIRECT','VIP_Group') and STATUS IN('ok', 'CALLBK', 'INCALL', 'HV') AND call_date >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ) AND call_date <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) ; SELECT COUNT(*) as counts from (SELECT phone_number,COUNT(phone_number) as counts FROM vicidial_closer_log where campaign_id in ('IN_METRO','AGENTDIRECT','VIP_Group') and STATUS IN('ok', 'CALLBK', 'INCALL', 'HV') AND call_date >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ) AND call_date <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) GROUP BY phone_number having counts >=3 ORDER BY counts DESC) as threeormorethan3 REPLACE INTO `Call_Center_EOD_Report`(`location_id`, `report_date`, `report_type`, `report_value`, `cdate`, `priority` ) VALUES ('Mumbai', date_format(subdate(now(),1),'%Y-%m-%d') , 'Repeat calls %', '7.16%', now(), 15 ); SELECT count( DISTINCT user ) as cnt FROM vicidial_agent_log WHERE campaign_id IN ('metro' ) AND event_time <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) AND event_time >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ); REPLACE INTO `Call_Center_EOD_Report`(`location_id`, `report_date`, `report_type`, `report_value`, `cdate`, `priority` ) VALUES ('Mumbai', date_format(subdate(now(),1),'%Y-%m-%d') , 'Total calls AVG per Advisor (IN + OB)', '82', now(), 16 ); REPLACE INTO `Call_Center_EOD_Report`(`location_id`, `report_date`, `report_type`, `report_value`, `cdate`, `priority` ) VALUES ('Mumbai', date_format(subdate(now(),1),'%Y-%m-%d') , 'Total Advisors Present', '29', now(), 17 ); SELECT `id`, `location`, `INBOUND_GRP`, `AFTR_HRS_STATUS`, `MQT_STATUS`, `INBOUND_NO_ANSWERED_STATUS`, `Out_Bound_GROUP`, `Out_Bound_Calls_Answered_STATUS`, `TMR1_STATUS`, `ADVISOR_GRP` FROM `Call_Center_EOD_GROUP_PROFILE` WHERE `location` ='Delhi' ; SELECT count( * ) as cnt FROM `vicidial_closer_log` WHERE campaign_id in ('Incoming','AGENTDIRECT') AND call_date >= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 00:00:00' ) AND call_date <= concat( date_format(subdate(now(),1),'%Y-%m-%d') ,' 23:59:59' ) Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [1045] Access denied for user 'root'@'192.168.23.27' (using password: NO)' in /usr/local/lib/php/Zend/Db/Adapter/Pdo/Abstract.php:129 Stack trace: #0 /usr/local/lib/php/Zend/Db/Adapter/Pdo/Abstract.php(129): PDO->__construct('mysql:host=192....', 'root', '', Array) #1 /usr/local/lib/php/Zend/Db/Adapter/Pdo/Mysql.php(109): Zend_Db_Adapter_Pdo_Abstract->_connect() #2 /usr/local/lib/php/Zend/Db/Adapter/Abstract.php(460): Zend_Db_Adapter_Pdo_Mysql->_connect() #3 /usr/local/lib/php/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT count( *...', Array) #4 /usr/local/lib/php/Zend/Db/Adapter/Abstract.php(756): Zend_Db_Adapter_Pdo_Abstract->query('SELECT count( *...', Array) #5 /var/www/html/mhl/Call_Center_EOD_Report_Nitin_test.php(141): Zend_Db_Adapter_Abstract->fetchRow('SELECT count( *...') #6 /var/www/html/mhl/Call_Center_EOD_Report_Nitin_test.php(537): ProcessData->Call_Center_EOD_Report('Delhi') #7 {main} Next exceptio in /usr/local/lib/php/Zend/Db/Adapter/Pdo/Abstract.php on line 144