how to grab the not equal row from joined table in mysql? -


i have 2 tables following

user_job_applied

user_job_applied

company_viewed_user

company_viewed_user

i want take rows not in company_viewed_user table relevant job_id in user_job_applied table. wrote following query it's not grabbed

select     `user_job_applied`.user_id     `user_job_applied` left join      `company_viewed_user`  on      `company_viewed_user`.user_id on `company_viewed_user`.user_id = `user_job_applied`.user_id                                    `company_viewed_user`.user_id null ,     `company_viewed_user`.emp_id in (select user_id                                       company_user                                       company_id='1')  ,     `user_job_applied`.job_id = '1';  

the output should following enter image description here

want move emp_id condition left join statement in clause

select `user_job_applied`.user_id `user_job_applied` left join `company_viewed_user` on `company_viewed_user`.user_id = `user_job_applied`.user_id ,                                                                  `company_viewed_user`.emp_id in (select user_id company_user company_id='1')                              `company_viewed_user`.user_id null ,                         `user_job_applied`.job_id = '1'; 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -