Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N
SELECT count(*) FROM vicidial_list FORCE INDEX(list_id) where called_since_last_reset='N' and status IN('DAINB','HUP','DA','PU','CBL','AA','ERI','NEW','PDROP','N','A','SCE','SCM','SCA','CB') and ((list_id IN('801','802','804','803','805','806','807','808','809','810','811'))) and ((gmt_offset_now IN('3.25','3.00','2.75','2.50','2.25','2.00','1.75','1.50','1.25','1.00','0.75','0.50','0.25','0.00','-0.25','-0.50','-0.75','-1.00','-1.25','-1.50','-1.75','-2.00','-2.25','-2.50','-2.75','-3.00','-3.25','-3.50','-3.75','-4.00','-4.25','-4.50','-4.75','-5.00','-5.25','-5.50','-5.75','-6.00','-6.25','-6.50','-6.75','-7.00','-7.25','-7.50','-7.75','-8.00','-8.25','-8.50','-8.75','-9.00','-9.25','-9.50','99') ) ) and (postal_code IN (SELECT zip FROM ziplist2 WHERE zip=postal_code AND CAST(SUBSTRING(vicidial_list.vendor_lead_code,1,1) as UNSIGNED)>=f1 AND CAST(SUBSTRING(vicidial_list.vendor_lead_code,3,1) as UNSIGNED)>=f2)) and (called_count < 10);
Users browsing this forum: No registered users and 95 guests