i have two tables, tasks and actions. actions has two columns, created_at and updated_at. tasks has a column started_at
how can i do something like
SELECT MAX( UNIX_TIMESTAMP( tasks.started_at ) ) AS started_at, action . *
FROM tasks, action
WHERE UNIX_TIMESTAMP( action.created_at ) > started_at
OR UNIX_TIMESTAMP( action.updated_at ) > started_at
trying to select all actions that have a greater created_at or updated_at than the MAX(tasks.started_at)
Don’t worry about performance, by default MySQL should cache
SELECT MAX(started_at) FROM tasksvalue. If you have other configuration addSQL_CACHEto main query:SELECT SQL_CACHE * FROM...