MySQL Forums
Forum List  »  Newbie

Re: MYSQL summing employee time
Posted by: tom davis
Date: August 11, 2016 12:46PM

SELECT SEC_TO_TIME(sum(TIME_TO_SEC(Reg_hours))) as RegHours
/*,SEC_TO_TIME( SUM( TIME_TO_SEC( Ovt_hours))) as Ovt_hours
, SEC_TO_TIME( SUM( TIME_TO_SEC( Vac_hours))) as Vac_hours */
, count(*)
FROM `Hours_Worked`
WHERE Supervisor in ('Kenny','Greg')
and Date=CURDATE()-1
and (Reg_hours > 1 or Ovt_hours > 1 or Vac_hours > 1)

Options: ReplyQuote


Subject
Written By
Posted
August 11, 2016 09:52AM
August 11, 2016 11:20AM
Re: MYSQL summing employee time
August 11, 2016 12:46PM
August 11, 2016 12:55PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.