sql 获取每个人的每天最早和最晚的打卡记录答:select id ,userid,userType,signtype,signdate,signtime,clientaddress,isincom,signform from tablewhere id in(select min(id) id from table where signtype=1 group by userid,signtype,signdateunion allselect max(id) id from table where signtype=2 group by userid,signtype,signdate)...