Hi,
I was wondering what the best query conversion for the following code would be if I had to use JOINS instead of using nested IN statements. I know job_id is more selective than the location_id, so job_id should be in the first where condition I suppose, but my JOIN knowledge isnt what it is supposed to be right now.
select * from user_master where user_id IN
(select user_id from user_role_job where job_id='000000000102' and user_id IN
(select user_id from user_location where location_id IN
(select location_id from gen_location where location_id='000009'))) and discontinued_date
I was wondering what the best query conversion for the following code would be if I had to use JOINS instead of using nested IN statements. I know job_id is more selective than the location_id, so job_id should be in the first where condition I suppose, but my JOIN knowledge isnt what it is supposed to be right now.
select * from user_master where user_id IN
(select user_id from user_role_job where job_id='000000000102' and user_id IN
(select user_id from user_location where location_id IN
(select location_id from gen_location where location_id='000009'))) and discontinued_date