Mysql – Effectively executing Conditional NOT IN Subquery with JOIN and GROUP BY
I need to adjust the following select statement to effectively filter out 523 records where 'first_date_purchased' is less than 'first_date_watched'. The following select statement returns 20778 records, of which 20255 should remain. SELECT se.student_id, si.date_registered, MIN(se.date_watched) AS first_date_watched, MIN(sp.date_purchased) AS…