考勤异常人次
[返回 指标总览](https://www.showdoc.com.cn/zbtx?page_id=7009130915939878 "返回 指标总览")
- 判断规则:参建方系统中设置了考核规则的人,不满足考勤规则的考勤次数
-
数据来源 数据库名称:工程大数据分析系统 yugao_data_analysis_data 数据表名称:考勤记录表 attendance_record (查看详情)
-
限制条件 1、数据有效记录计数,is_delete=0 2、考勤异常,is_abnormal=1
- 代码实现(参考)
select department_name, count(1) as number from attendance_record WHERE ( business_project_id in ( select business_project_id FROM project_cooperation where is_delete=0 and data_status=1 and business_project_name not like "测试%" ) and is_abnormal = 1 and attendance_week = "2021-06-14" and attendance_date <> "2021-06-21" and is_delete = 0 ) group by department_name