select `rooms`.*, (selectcount(*) from `people` innerjoin `person_paths` on `people`.`id` = `person_paths`.`person_id` where `rooms`.`classe_id` = `person_paths`.`classe_id` and `people`.`deleted_at` isnull) as `participants_count`, (selectcount(*) from `people` innerjoin `person_paths` on `people`.`id` = `person_paths`.`person_id` where `rooms`.`classe_id` = `person_paths`.`classe_id` and `enable` =1and `people`.`deleted_at` isnull) as `participants_accepted_count` from `rooms` where (`is_private` =0) limit 30offset0