• hi ,

    pls check this query

    select cardno,min(datetime1),max(datetime1),action

    from view1

    group by cardno,datetime1,action