selectcount(*) as aggregate from `posts` where `country_id` =13and (`posts`.`sys_status` =1and `posts`.`status` ='enabled') and `category_id` =11and `iskan_project_id` isnulland `ad_type` in (1, 2) and `posts`.`city_id` =385and `posts`.`percent` isnulland `posts`.`is_promoted` =0and `posts`.`deleted_at` isnullandexists (select*from `users` where `posts`.`user_id` = `users`.`id`) and `posts`.`user_id` !=5716
select `regions`.`ar_name` as `name`, `regions`.`id`, `post_regions`.`post_id` as `pivot_post_id`, `post_regions`.`region_id` as `pivot_region_id` from `regions` innerjoin `post_regions` on `regions`.`id` = `post_regions`.`region_id` where `post_regions`.`post_id` in (7680, 8518, 8736, 18676, 20038, 23589, 23627, 23646, 23914, 24576)