[Home] [Help]
214: from IEU_SH_SESSIONS I1,
215: IEU_SH_ACTIVITIES I2,
216: CCT_media_items M,
217: JTF_RS_GROUP_MEMBERS J4,
218: CCT_AGENT_RT_STATS C1
219: where I1.session_id = I2.session_id
220: and I1.application_id = 696
221: and I1.active_flag ='T'
222: and I1.end_date_time is NULL
238: /* removed
239: Select count(distinct I1.resource_id) into wrap_graph
240: from IEU_SH_SESSIONS I1,
241: IEU_SH_ACTIVITIES I2,
242: CCT_AGENT_RT_STATS C1,
243: CCT_media_items M,
244: JTF_RS_GROUP_MEMBERS J4
245: where I1.session_id = I2.session_id
246: and I1.application_id = 696
567:
568: Select sum(l_date_high - C1.last_update_date)*24*3600 into wrap_now
569: from IEU_SH_SESSIONS I1,
570: IEU_SH_ACTIVITIES I2,
571: CCT_AGENT_RT_STATS C1
572: where I1.session_id = I2.session_id
573: and I1.application_id = 696
574: and I2.active_flag ='T'
575: and I2.activity_type_code = 'MEDIA'
718:
719: Cursor getTalkAgentList is
720: Select
721: (l_date_high - C1.last_update_date)*24*3600 duration
722: from CCT_AGENT_RT_STATS C1
723: where C1.has_call = 'T'
724: and C1.agent_id = v_resource_id
725: and C1.last_update_date between l_date_low and l_date_high;
726:
727:
728: Cursor getWrapAgentList is
729: Select
730: (l_date_high - C1.last_update_date)*24*3600 duration
731: from CCT_AGENT_RT_STATS C1,
732: /* CCT_MEDIA_ITEMS C2,*/
733: IEU_SH_SESSIONS I1,
734: IEU_SH_ACTIVITIES I2
735: where C1.has_call = 'F'
1112: (l_date_high - C1.last_update_date)*24*3600 talkTime,
1113: /* J3.group_name groupName,*/
1114: I1.extension extension,
1115: C2.classification class
1116: from CCT_AGENT_RT_STATS C1,
1117: CCT_MEDIA_ITEMS C2,
1118: JTF_RS_RESOURCE_EXTNS_VL J,
1119: JTF_RS_GROUPS_VL J3,
1120: JTF_RS_GROUP_MEMBERS J4,
1139: J.resource_name agentName,
1140: (l_date_high - C1.last_update_date)*24*3600 wrapTime,
1141: /* J3.group_name groupName,*/
1142: I1.extension extension
1143: from CCT_AGENT_RT_STATS C1,
1144: JTF_RS_RESOURCE_EXTNS_VL J,
1145: JTF_RS_GROUPS_VL J3,
1146: JTF_RS_GROUP_MEMBERS J4,
1147: IEU_SH_SESSIONS I1,