Filtring of table in sql server
I want to filter a table which contain employees entry and exit time details. any employee can enter several time and exit several time ,I want to filter my table according latest entry time and exit time of the each day.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Ritesh Diyawar101 reputationPosted Oct 4, 2012, 8:44 PM EDT
I think u should write the query something like that:
select Min(ExitTime) as EntryTime, Max(ExitTime) as ExitTime from employee
group by
cast( AtendeceDate as date)
Rajeev KumarRank #1,334 · 1.3K reputationPosted Feb 27, 2023, 1:42 AM EST
select Max(EntryTime) as EntryTime, Max(ExitTime) as ExitTime from employee
group by
cast( AtendeceDate as date)