select post ,round(avg(worktime),3) work_hours FROM( select post ,round(TIMESTAMPDIFF(minute,first_clockin,last_clockin)/60,3) as worktime from attendent_tb a join staff_tb s on a.staff_id = s.staff_id ) as wk group by post order by work_hours desc