I'm trying to write subquery that use a value from parent query.
Like this:
SELECT
e.id,
e.name,
(SELECT COUNT(ea.id)
FROM employee_attendance ea
WHERE ea.emp_id == e.id) AS attendance
FROM
employee e
Is there anyway to use this in SQLAlchemy subquery ?