SELECT `s`.*,`v`.`id` AS `v_id`, `v`.`name` AS `v_name`, `v`.`title` AS `v_title`, `v`.`platform` AS `v_platform`, `v`.`type` AS `v_type`, `v`.`single_text` AS `v_single_text`, `v`.`popular` AS `v_popular`, `v`.`protocol` AS `v_protocol`, `v`.`date_create` AS `v_date_create`, `v`.`date_update` AS `v_date_update`, `v`.`user_id_create` AS `v_user_id_create`, `v`.`user_id_update` AS `v_user_id_update` FROM `servers` AS `s` LEFT JOIN `versions` AS `v` ON `v`.`id` = `s`.`version_id` AND `v`.`type` = 'servers' WHERE `s`.`version_id` = '?' AND `s`.`accepted` = '?' AND JSON_CONTAINS(`s`.`tags`, '?') ORDER BY `s`.`rating` DESC, `s`.`status` DESC, `s`.`votes` DESC, `s`.`uptime` DESC, `s`.`id` ASC LIMIT 40 OFFSET 0