Delete Early Out
   
   

SELECT
h.id,h.emp_id,p.PBI_NAME,p.PBI_DESIGNATION,p.PBI_DEPARTMENT,u.group_name,h.att_date,h.dayname,h.in_time,h.out_time,h.dayname
FROM hrm_att_summary h,office_location l,user_group u,personnel_basic_info p
WHERE
h.emp_id=p.PBI_ID
AND p.PBI_ORG=u.id
AND u.id=l.GROUP_ID
and h.att_date BETWEEN '2018-04-26' AND '2018-05-17'
and h.out_time<concat(att_date,' 18:00:00')
and h.dayname !='Friday'
and h.leave_id=0
and h.iom_sl_no=0
and p.JOB_LOCATION IN(1,7,15,16,18,21,70)
and p.PBI_JOB_STATUS ='IN SERVICE'
and p.PBI_DEPARTMENT NOT IN('Admin (Support Service Section)','TRS','GYM')
GROUP BY h.id
order by h.emp_id,h.att_date;

SELECT
h.id,h.emp_id,p.PBI_NAME,p.PBI_DESIGNATION,p.PBI_DEPARTMENT,u.group_name,h.att_date,h.dayname,h.in_time,h.out_time,h.dayname
FROM hrm_att_summary h,office_location l,user_group u,personnel_basic_info p
WHERE
h.emp_id=p.PBI_ID
AND p.PBI_ORG=u.id
AND u.id=l.GROUP_ID
and h.att_date BETWEEN '2018-05-18' AND '2018-05-25'
and h.out_time<concat(att_date,' 16:30:00')
and h.dayname !='Friday'
and h.leave_id=0
and h.iom_sl_no=0
and p.JOB_LOCATION IN(1,7,15,16,18,21,70)
and p.PBI_JOB_STATUS ='IN SERVICE'
and p.PBI_DEPARTMENT NOT IN('Admin (Support Service Section)','TRS','GYM')
GROUP BY h.id
order by h.emp_id,h.att_date;