
SELECT
l.admin_id AS `Staff ID`,
CONCAT( ad.firstname, ' ', ad.lastname ) AS `Staff Member`,
SUM(TIME_TO_SEC(TIMEDIFF(l.logout,l.login)))/3600 as `Hours Online`
FROM hb_admin_log l 
JOIN hb_admin_details ad ON (ad.id=l.admin_id)
WHERE
 YEARWEEK(l.login) = YEARWEEK(NOW())
 GROUP BY admin_id