Query keeps on giving me 'unknown column' issue
The problem is that your select in the from part:

SELECT DISTINCT date(l.created_at),
(SELECT MIN(created_at) FROM logs WHERE updated_at BETWEEN l.created_at AND l.updated_at) AS TIME_ENTER,
(SELECT MAX(updated_at) FROM logs WHERE created_at BETWEEN l.created_at AND l.updated_at) AS TIME_EXIT
FROM logs l


does not return the field updated_at.