select * from `branches` where `slug` = ? and exists (select * from `products` inner join `branch_product` on `products`.`id` = `branch_product`.`product_id` where `branches`.`id` = `branch_product`.`branch_id` and `active` = ? order by `ordering` asc)
information