selectDATEDIFF(f.appTime,f1.appTime) AS sjhoho,
a1.username,b1.orgname,a3.appTime leavetm ,a2.appTime overtm, from jiabansqd f ,f_attendApp f1,
pub_user a1 left join f_attendApp a3 on a1.userid=a3.userid left join jiabansqd a2 on a2.userid=a1.userid left join pub_org b1 on b1.orgid=a2.orgid=a3.orgid where a2.processInsStatus !=9
选择a.name,b.email其中a.fenleiid = 3和a.nameid = b.namid