select*from `feature_listings` where (exists (select*from `states` innerjoin `feature_listings_state` on `states`.`StateID` = `feature_listings_state`.`state_id` where `feature_listings`.`id` = `feature_listings_state`.`feature_listings_id` and `state_id` ='83') and `course_type` ='84') and `feature_listings`.`deleted_at` isnull
select*from `feature_listings` where (exists (select*from `states` innerjoin `feature_listings_state` on `states`.`StateID` = `feature_listings_state`.`state_id` where `feature_listings`.`id` = `feature_listings_state`.`feature_listings_id` and `state_id` ='83') and `course_type` ='84'and `course_type` ='84') and `feature_listings`.`deleted_at` isnull
select*from `feature_listings` where (exists (select*from `states` innerjoin `feature_listings_state` on `states`.`StateID` = `feature_listings_state`.`state_id` where `feature_listings`.`id` = `feature_listings_state`.`feature_listings_id` and `state_id` =0) and `course_type` ='84') and `feature_listings`.`deleted_at` isnull
select*from `feature_listings` where (exists (select*from `states` innerjoin `feature_listings_state` on `states`.`StateID` = `feature_listings_state`.`state_id` where `feature_listings`.`id` = `feature_listings_state`.`feature_listings_id` and `state_id` =0) and `course_type` ='84'orexists (select*from `states` innerjoin `feature_listings_state` on `states`.`StateID` = `feature_listings_state`.`state_id` where `feature_listings`.`id` = `feature_listings_state`.`feature_listings_id` and `region` =''and `Status` =1) and `course_type` ='84') and `feature_listings`.`deleted_at` isnull