2
Reply

how to get min intime and max outtime from table

siva nathan

siva nathan

Apr 10 2017 12:47 PM
245
how to get min intime and max outtime from table,
i have a table table1 in that table i have many columns and records  like
empid     empname      attendencedate    
  1                 a                 04-01-17 08:45am
  1                 a                 04-01-17 09:45am
  1                 a                 04-01-17 10:45am 
  1                 a                 04-01-17 12:45pm 
  1                 a                 04-01-17 01:45pm 
  1                 a                 04-01-17 08:45pm 
 
 
i want only select  minimum attendencedate is  intime and maximum attendencedate  is outtime like below format
 
empid          empname                intme                              outtime
1                        a             04-01-17 08:45am              04-01-17 08:45pm
 

Answers (2)