SELECT c.*, IF(`user2obj`.`u_id`>1000, `user2obj`.`u_id`, NULL) AS u_id, IFNULL(b.opinions, 0) AS opinions, `e_plus`.`att`, `e_plus`.`top10`, `e_plus`.`top500`, IFNULL(s.specs, 0) AS specs FROM ( SELECT `colleges`.`id`, `colleges`.`name`, `colleges`.`subj_id`, `colleges`.`city_id`, `colleges`.`gos`, `colleges`.`hostel`, IF(`colleges`.`packetEnd`>DATE(NOW()), "sert", "") AS packet, `colleges`.`rating`, `colleges`.`metro_id` FROM `colleges` WHERE `delReason`="" AND `colleges`.`subj_id`=84 AND `colleges`.`city_id`=2242) c LEFT JOIN `lic_okso` ON `lic_okso`.`col_id` = c.`id` LEFT JOIN `okso` ON `okso`.`id`=`lic_okso`.`okso_id` LEFT JOIN `general`.`metros` ON c.`metro_id`=`metros`.`id` LEFT JOIN `e_plus` ON `e_plus`.`col_id`=c.`id` LEFT JOIN `college`.`user2obj` ON `user2obj`.`o_id`=c.`id` LEFT JOIN ( SELECT `col_id`, count( * ) AS opinions FROM `college`.`opinions` WHERE `approved`="1" GROUP BY `col_id` ) b ON b.`col_id` = c.`id` LEFT JOIN ( SELECT `col_id`, count(*) AS specs FROM `college`.`lic_okso` GROUP BY `col_id` ) s ON s.`col_id` = c.`id` GROUP BY c.`id` ORDER BY c.`packet` DESC, c.`rating` DESC LIMIT 0, 30
SQLSTATE[08S01]: Communication link failure: 1053 Server shutdown in progress