Dear Gents,
I recently created a program that manage employees attendance , It was working fine till one employee attend more than 2 times per day ( In Out then In Out again )
attached photos to be more explained
here at 8/5/2023 he has 4 records; I need to make a query to bring the 4 records in 1 record and calculate total working hours on that day.
something like what i done but more flexible.
here in that query um taking the max records from punch state I and punch state O to bring the final punch for employee, but on 8/5/2023 the query was conflicted!
I also attached the database if anyone can help .