select `products`.*, (selectcount(*) from `product_reviews` where `products`.`id` = `product_reviews`.`product_id`) as `reviews_count` from `products` where `products`.`id` ='157'and `products`.`deleted_at` isnull limit 1
select `vendors`.*, (selectcount(*) from `reviews` where `vendors`.`id` = `reviews`.`vendor_id` and `reviews`.`deleted_at` isnull) as `reviews_count` from `vendors` where `vendors`.`id` in (0)
select `tags`.*, `product_tag`.`product_id` as `pivot_product_id`, `product_tag`.`tag_id` as `pivot_tag_id` from `tags` innerjoin `product_tag` on `tags`.`id` = `product_tag`.`tag_id` where `product_tag`.`product_id` in (157)
select `categories`.*, `category_product`.`product_id` as `pivot_product_id`, `category_product`.`category_id` as `pivot_category_id` from `categories` innerjoin `category_product` on `categories`.`id` = `category_product`.`category_id` where `category_product`.`product_id` in (157) and `categories`.`deleted_at` isnull
select `subcategories`.*, `product_subcategory`.`product_id` as `pivot_product_id`, `product_subcategory`.`subcategory_id` as `pivot_subcategory_id` from `subcategories` innerjoin `product_subcategory` on `subcategories`.`id` = `product_subcategory`.`subcategory_id` where `product_subcategory`.`product_id` in (157) and `subcategories`.`deleted_at` isnull
select `options`.*, `option_product`.`product_id` as `pivot_product_id`, `option_product`.`option_id` as `pivot_option_id` from `options` innerjoin `option_product` on `options`.`id` = `option_product`.`option_id` where `option_product`.`product_id` in (157) and `options`.`deleted_at` isnull
select `products`.*, (selectcount(*) from `product_reviews` where `products`.`id` = `product_reviews`.`product_id`) as `reviews_count` from `products` whereexists (select*from `ad_types` where `products`.`ad_type_id` = `ad_types`.`id` and `id` =3) and `id` !='157'and `products`.`deleted_at` isnull limit 10
select `vendors`.*, (selectcount(*) from `reviews` where `vendors`.`id` = `reviews`.`vendor_id` and `reviews`.`deleted_at` isnull) as `reviews_count` from `vendors` where `vendors`.`id` in (0)
select `tags`.*, `product_tag`.`product_id` as `pivot_product_id`, `product_tag`.`tag_id` as `pivot_tag_id` from `tags` innerjoin `product_tag` on `tags`.`id` = `product_tag`.`tag_id` where `product_tag`.`product_id` in (47, 49, 50, 51, 52, 53, 54, 55, 66, 67)
select `categories`.*, `category_product`.`product_id` as `pivot_product_id`, `category_product`.`category_id` as `pivot_category_id` from `categories` innerjoin `category_product` on `categories`.`id` = `category_product`.`category_id` where `category_product`.`product_id` in (47, 49, 50, 51, 52, 53, 54, 55, 66, 67) and `categories`.`deleted_at` isnull
select `subcategories`.*, `product_subcategory`.`product_id` as `pivot_product_id`, `product_subcategory`.`subcategory_id` as `pivot_subcategory_id` from `subcategories` innerjoin `product_subcategory` on `subcategories`.`id` = `product_subcategory`.`subcategory_id` where `product_subcategory`.`product_id` in (47, 49, 50, 51, 52, 53, 54, 55, 66, 67) and `subcategories`.`deleted_at` isnull
selectcount(*) as aggregate from `product_user_info` where `user_id` =168andexists (select*from `products` where `product_user_info`.`product_id` = `products`.`id` and `user_approve` =1and `approved` =1and `products`.`deleted_at` isnull) and `product_user_info`.`deleted_at` isnull