select * from ( (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 1 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 1 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 2 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 2 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 3 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 3 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 4 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 4 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 5 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 5 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 6 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 6 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 7 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 7 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 8 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 8 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 9 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 9 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 10 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 10 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 11 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 11 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 12 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 12 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 13 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 13 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 14 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 14 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 15 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 15 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 16 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 16 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 17 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 17 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 18 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 18 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 19 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 19 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 20 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 20 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 21 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 21 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 22 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 22 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 23 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 23 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 24 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 24 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 25 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 25 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 26 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 26 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 27 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 27 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 28 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 28 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 29 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 29 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) union (Select sum(o)/count(*), sum(o), count(*), city, franchise from ((SELECT wp.player_id, wp.overall * 2 as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 30 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5) union (SELECT wp.player_id, wp.overall as o, wp.team_id FROM `week_player` wp WHERE wp.team_id = 30 and wp.block = 1 and wp.inj = 0 and wp.year_season = 2016 and wp.week = 1 order by wp.overall desc limit 5, 5)) a left join team t on t.td_id = a.team_id group by a.team_id, city, franchise) ) b order by 1 desc