selectcount(*) as aggregate from `products` where `id` in (146, 147, 157) and `products`.`id` in (146, 147, 157) andexists (select*from `categories` innerjoin `product_categories` on `categories`.`id` = `product_categories`.`category_id` where `products`.`id` = `product_categories`.`product_id` and `categories`.`id` =7) and `status` =1
select*from `products` where `id` in (146, 147, 157) and `products`.`id` in (146, 147, 157) andexists (select*from `categories` innerjoin `product_categories` on `categories`.`id` = `product_categories`.`category_id` where `products`.`id` = `product_categories`.`product_id` and `categories`.`id` =7) and `status` =1 limit 20offset0