Array ( [0] => non_perishable [1] => both [2] => non_perishable [3] => 1 [4] => 1 [5] => 1 [6] => approved [7] => admin [8] => 1 [9] => physical [10] => non_perishable [11] => both [12] => non_perishable [13] => 1 [14] => 1 [15] => 1 [16] => approved [17] => admin [18] => 1 [19] => physical )

select `publishing_houses`.*, (select count(*) from `digital_product_publishing_houses` where `publishing_houses`.`id` = `digital_product_publishing_houses`.`publishing_house_id` and exists (select * from `products` where `digital_product_publishing_houses`.`product_id` = `products`.`id` and (exists (select * from `sellers` where `products`.`user_id` = `sellers`.`id` and `goods_type` = ?) or exists (select * from `sellers` where `products`.`user_id` = `sellers`.`id` and `goods_type` = ?) and `goods_type` = ?) and exists (select * from `brands` where `products`.`brand_id` = `brands`.`id` and `status` = ?) and (`status` = ? and `request_status` = ?) and (exists (select * from `sellers` where `products`.`user_id` = `sellers`.`id` and (`status` = ?)) or ((`added_by` = ? and `status` = ?))) and `product_type` in (?))) as `publishing_house_products_count` from `publishing_houses` where exists (select * from `digital_product_publishing_houses` where `publishing_houses`.`id` = `digital_product_publishing_houses`.`publishing_house_id` and exists (select * from `products` where `digital_product_publishing_houses`.`product_id` = `products`.`id` and (exists (select * from `sellers` where `products`.`user_id` = `sellers`.`id` and `goods_type` = ?) or exists (select * from `sellers` where `products`.`user_id` = `sellers`.`id` and `goods_type` = ?) and `goods_type` = ?) and exists (select * from `brands` where `products`.`brand_id` = `brands`.`id` and `status` = ?) and (`status` = ? and `request_status` = ?) and (exists (select * from `sellers` where `products`.`user_id` = `sellers`.`id` and (`status` = ?)) or ((`added_by` = ? and `status` = ?))) and `product_type` in (?)))