Based on Eric's decision - here is my final request, if anyone has a similar problem - thanks for helping everyone.
SELECT `teams`.`id`, `teams`.`name`, SUM(`all_wins`.`gp`) AS `gp`, SUM(`all_wins`.`w`) AS `w`, SUM(`all_wins`.`l`) AS `l`, SUM(`all_wins`.`t`) AS `t`, SUM(`all_wins`.`ptf`) AS `ptf`, SUM(`all_wins`.`pta`) AS `pta` FROM ( SELECT `home_team_id` as `team_id`, COUNT(`home_score`) AS `gp`, SUM(IF(`home_score` > `away_score`,1,0)) as `w`, SUM(IF(`home_score` < `away_score`,1,0)) as `l`, SUM(IF(`home_score` = `away_score`,1,0)) as `t`, SUM(IFNULL(`home_score`,0)) as `ptf`, SUM(IFNULL(`away_score`,0)) as `pta` FROM `games` GROUP BY `home_team_id` UNION ALL SELECT `away_team_id` as `team_id`, COUNT(`home_score`) AS `gp`, SUM(IF(`away_score` > `home_score`,1,0)) as `w`, SUM(IF(`away_score` < `home_score`,1,0)) as `l`, SUM(IF(`away_score` = `home_score`,1,0)) as `t`, SUM(IFNULL(`away_score`,0)) as `ptf`, SUM(IFNULL(`home_score`,0)) as `pta` FROM `games` GROUP BY `away_team_id` ) `all_wins` LEFT JOIN `teams` ON `all_wins`.`team_id` = `teams`.`id` GROUP BY `all_wins`.`team_id` ORDER BY SUM(`all_wins`.`w`) DESC, SUM(`all_wins`.`ptf`) DESC
source share