Untitled

mail@pastecode.io avatar
unknown
mysql
a month ago
317 B
4
Indexable
Never
SELECT 
        name, division, t.intime, t.outtime
    FROM
        (SELECT 
        employeeid, MIN(timein) AS InTime, MAX(timeout) AS OutTime
    FROM
        timelog
    WHERE
        division = '7217'
            AND DATE(timein) >= CURDATE()
    GROUP BY employeeid) t
    JOIN employee e ON e.id = t.employeeid
Leave a Comment