EXPLAIN SELECT `users`.`login`, `realname`.`realname`, `users`.`Passive`, `users`.`Down`, `users`.`AlwaysOnline`, `users`.`Tariff`, `users`.`Credit`, `users`.`Cash`, `users`.`ip`, `city`.`cityname`, `street`.`streetname`, `build`.`buildnum`, `apt`.`apt`, CONCAT(`street`.`streetname`, ' ', `build`.`buildnum`, IF(`apt`.`apt`, CONCAT('/', `apt`.`apt`), '')) AS `fulladdress`, ( IFNULL(`users`.`D0`, 0) + IFNULL(`users`.`U0`, 0) + IFNULL(`oph`.`total`, 0) + IFNULL(`mlg`.`total`, 0) ) AS `totaltraff` FROM `users` LEFT JOIN `realname` ON `users`.`login` = `realname`.`login` LEFT JOIN `address` ON `users`.`login` = `address`.`login` LEFT JOIN `apt` ON `address`.`aptid` = `apt`.`id` LEFT JOIN `build` ON `apt`.`buildid` = `build`.`id` LEFT JOIN `street` ON `build`.`streetid` = `street`.`id` LEFT JOIN `city` ON `street`.`cityid` = `city`.`id` LEFT JOIN ( SELECT `login`, SUM(IFNULL(`D0`, 0) + IFNULL(`U0`, 0)) AS `total` FROM `ophtraff` WHERE `year` = YEAR(CURDATE()) AND `month` = MONTH(CURDATE()) GROUP BY `login` ) AS `oph` ON `users`.`login` = `oph`.`login` LEFT JOIN ( SELECT `login`, SUM(IFNULL(`D0`, 0) + IFNULL(`U0`, 0)) AS `total` FROM `mlg_ishimura` WHERE `year` = YEAR(CURDATE()) AND `month` = MONTH(CURDATE()) GROUP BY `login` ) AS `mlg` ON `users`.`login` = `mlg`.`login` ORDER BY fulladdress asc LIMIT 0, 50;