Project

General

Profile

Actions

Tareas #4803

open

reporte de citas y entrevistas por canal

Added by Jose Orlando over 1 year ago. Updated over 1 year ago.

Status:
Resuelta
Priority:
Normal
Assignee:
Start date:
05/15/2024
Due date:
% Done:

0%

Estimated time:

Description

filtros:
proyecto
rango de fechas (de la gestion, startdate)

select
ca.name as canal,
'CITAS',
count() as citas,
0 as entrevistas
from c_contactactivity ge
inner join tb_activitytype ta on ta.tb_activitytype_ID = ge.tb_activitytype_ID
inner join c_opportunity op on op.c_opportunity_id = ge.c_opportunity_id
left join c_channel ca on ca.c_channel_id = op.c_channel_id
where ge.ad_client_id = 1000005
and ge.startdate >= '2023-01-01'
and ActivityCategory = 'C'
group by 1,2
UNION
select
ca.name as canal,
'ENTREVISTAS',
0 as citas,
count(
) as entrevistas
from c_contactactivity ge
inner join tb_activitytype ta on ta.tb_activitytype_ID = ge.tb_activitytype_ID
inner join c_opportunity op on op.c_opportunity_id = ge.c_opportunity_id
left join c_channel ca on ca.c_channel_id = op.c_channel_id
where ge.ad_client_id = 1000005
and ge.startdate >= '2023-01-01'
and ActivityCategory = 'E'
group by 1,2
order by 1,2


Files

clipboard-202405151052-rqxox.png (1.06 MB) clipboard-202405151052-rqxox.png Jose Orlando, 05/15/2024 10:52 AM
clipboard-202405151707-y3etb.png (13.3 KB) clipboard-202405151707-y3etb.png Armando Chuto, 05/15/2024 05:08 PM
clipboard-202405151743-vocju.png (47 KB) clipboard-202405151743-vocju.png Armando Chuto, 05/15/2024 05:44 PM
Actions #1

Updated by Armando Chuto over 1 year ago

select
ca.name as canal,
'CITAS' as tipo,
count(ge.*) as citas,
0 as entrevistas
from c_contactactivity ge
inner join tb_activitytype ta on ta.tb_activitytype_ID = ge.tb_activitytype_ID
inner join c_opportunity op on op.c_opportunity_id = ge.c_opportunity_id
left join c_channel ca on ca.c_channel_id = op.c_channel_id
where ge.ad_client_id = 1000005 --$P{AD_Client_ID}
and ge.startdate >= COALESCE
and ge.startdate <= COALESCE
and ActivityCategory = 'C'
group by 1,2
UNION
select
ca.name as canal,
'ENTREVISTAS' as tipo,
0 as citas,
count(ge.*) as entrevistas
from c_contactactivity ge
inner join tb_activitytype ta on ta.tb_activitytype_ID = ge.tb_activitytype_ID
inner join c_opportunity op on op.c_opportunity_id = ge.c_opportunity_id
left join c_channel ca on ca.c_channel_id = op.c_channel_id
where ge.ad_client_id =1000005 --$P{AD_Client_ID}
and ge.startdate >= COALESCE
and ge.startdate <= COALESCE
and ActivityCategory = 'E'
group by 1,2
order by 1,2

Actions #4

Updated by Armando Chuto over 1 year ago

  • Status changed from Nueva to Resuelta
Actions

Also available in: Atom PDF