Commit 7d452b9e authored by yindanlei's avatar yindanlei

add fangan_day report codes

parent f9f54c57
...@@ -182,7 +182,8 @@ LEFT JOIN ...@@ -182,7 +182,8 @@ LEFT JOIN
WHERE partition_day=regexp_replace(date_sub(current_date(),1),'-','') WHERE partition_day=regexp_replace(date_sub(current_date(),1),'-','')
AND REGEXP_REPLACE(SUBSTR(call_time,0,10), '-', '')>='20200701' AND REGEXP_REPLACE(SUBSTR(call_time,0,10), '-', '')>='20200701'
AND REGEXP_REPLACE(SUBSTR(call_time,0,10), '-', '')<=regexp_replace(date_sub(current_date(),1),'-','') AND REGEXP_REPLACE(SUBSTR(call_time,0,10), '-', '')<=regexp_replace(date_sub(current_date(),1),'-','')
AND start_time+ interval 30 second <= release_time --通话时长大于30秒 --AND start_time+ interval 30 second <= release_time --通话时长大于30秒
AND unix_timestamp(substr(start_time,1,19))+30<=unix_timestamp(substr(release_time,1,19))
)a )a
LEFT JOIN LEFT JOIN
( (
...@@ -298,7 +299,8 @@ LEFT JOIN ...@@ -298,7 +299,8 @@ LEFT JOIN
WHERE partition_day=regexp_replace(date_sub(current_date(),1),'-','') WHERE partition_day=regexp_replace(date_sub(current_date(),1),'-','')
AND REGEXP_REPLACE(SUBSTR(call_time,0,10), '-', '')>='20200701' AND REGEXP_REPLACE(SUBSTR(call_time,0,10), '-', '')>='20200701'
AND REGEXP_REPLACE(SUBSTR(call_time,0,10), '-', '')<=regexp_replace(date_sub(current_date(),1),'-','') AND REGEXP_REPLACE(SUBSTR(call_time,0,10), '-', '')<=regexp_replace(date_sub(current_date(),1),'-','')
AND start_time+ interval 30 second <= release_time --通话时长大于30秒 --AND start_time+ interval 30 second <= release_time --通话时长大于30秒
AND unix_timestamp(substr(start_time,1,19))+30<=unix_timestamp(substr(release_time,1,19))
)a )a
LEFT JOIN LEFT JOIN
( (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment