修改汇总统计,只查询喀什的的
This commit is contained in:
@@ -12,12 +12,12 @@
|
||||
job_stats AS (
|
||||
SELECT COUNT(*) AS 归集岗位合计,sum(case when type='4' then 1 else 0 end) 零工岗位数量,
|
||||
sum(case when type='4' then COALESCE(vacancies,0) else 0 end) 零工招聘人数 FROM job, time_params tp
|
||||
WHERE del_flag='0' and (tp.start_time IS NULL OR posting_date >= tp.start_time)
|
||||
WHERE del_flag='0' and region_code like '6531%' and (tp.start_time IS NULL OR posting_date >= tp.start_time)
|
||||
AND (tp.end_time IS NULL OR posting_date < tp.end_time)
|
||||
),
|
||||
company_stats AS (
|
||||
SELECT COUNT(company_id) AS 注册企业数 FROM company, time_params tp
|
||||
WHERE del_flag='0'
|
||||
WHERE del_flag='0' and region_code like '6531%'
|
||||
AND (tp.start_time IS NULL OR create_time >= tp.start_time)
|
||||
AND (tp.end_time IS NULL OR create_time < tp.end_time)
|
||||
),
|
||||
@@ -45,8 +45,9 @@
|
||||
cm.map_key, cm.code,
|
||||
COUNT(company_id) AS zcqys,
|
||||
SUM(CASE
|
||||
WHEN <![CDATA[ create_time >= CAST(#{startTime} AS timestamp) ]]>
|
||||
<![CDATA[ AND create_time <= CAST(#{endTime} AS timestamp) ]]>
|
||||
<![CDATA[ WHEN coalesce(#{startTime}, create_time) IS NOT NULL AND coalesce(#{endTime}, create_time) IS NOT NULL
|
||||
AND create_time >= CAST(#{startTime} AS timestamp)
|
||||
AND create_time <= CAST(#{endTime} AS timestamp) ]]>
|
||||
THEN 1 ELSE 0 END) AS xzcqys
|
||||
FROM company c
|
||||
LEFT JOIN area_code_mapping cm ON SUBSTRING(c.region_code, 1, 6) = cm.code
|
||||
|
||||
Reference in New Issue
Block a user