this is my first query
SELECT DISTINCT(u.nickname) FROM user u 
                           where   u.id  IN(SELECT `submission_user`.`user_id` from `submission_user`) AND
                           u.member_since   >= '2015-07-01'
this is my second query
SELECT DISTINCT(u.nickname) FROM user u LEFT JOIN submission_user su ON su.user_id = u.id  
                            LEFT JOIN submission s ON s.id = su.submission_id
                             WHERE  s.date_time BETWEEN '2017-10-31' and '2018-07-31'
and this is my third query
SELECT DISTINCT(u.nickname) FROM user u LEFT JOIN submission_user su ON su.user_id = u.id  
                            LEFT JOIN track_user tu ON tu.user_id = u.id
                            LEFT JOIN track ON track.id = tu.track_id                       
                            where track.uploaded_timestamp BETWEEN '2017-10-31' and '2018-07-31'
and after that, I am merging the second and third query result
 $ids_reactivated = array_unique(array_merge($track_user, $submit_user));
so my question is that if I want to subtract query one result to merge result means with the (query 2 and 3)i.e in my case: $ids_reactivated
anyone have an idea how to do it ... I already tried many ways and passed one day...
hope pepls help me thanks