Update date range for reports.

Replace hotel name with routing hotel name for calls
This commit is contained in:
Anna Saiapina 2024-07-17 08:48:00 +00:00 committed by GCP Dataform
parent 51cd892506
commit 8b1d674626
2 changed files with 5 additions and 3 deletions

View File

@ -21,7 +21,7 @@ select sc.SESSION_ID,
EXTRACT(YEAR FROM sc.TIMESTAMP) YEAR,
sc.DAY_OF_WEEK,
sc.CALL_ID,
sc.HOTEL_NAME,
sc.ROUTING_HOTEL_NAME,
sc.AGENT_ID,
sc.AGENT_NAME,
a.LANGUAGES,
@ -67,4 +67,5 @@ left join ${ref("stg_CAMPAIGN")} c
on sc.CAMPAIGN = c.CAMPAIGN
left join ${ref("stg_MAPPING_SKILL")} s
on sc.SKILL = s.SKILL
where date(sc.TIMESTAMP) >= DATE_SUB(CURRENT_DATE(), INTERVAL 5 DAY)
where date(sc.TIMESTAMP) >= DATE_SUB(CURRENT_DATE(), INTERVAL 6 DAY)
and date(sc.TIMESTAMP) < CURRENT_DATE()

View File

@ -48,4 +48,5 @@ left join ${ref("stg_MAPPING_SKILL")} s
on d.SKILL = s.SKILL
left join ${ref("stg_MAPPING_MEDIA_TYPE")} m
on d.MEDIA_TYPE = m.MEDIA_TYPE
where date(d.TIMESTAMP) >= DATE_SUB(CURRENT_DATE(), INTERVAL 5 DAY)
where date(d.TIMESTAMP) >= DATE_SUB(CURRENT_DATE(), INTERVAL 6 DAY)
and date(d.TIMESTAMP) < CURRENT_DATE()