MariaDB [teeworlds]> select Map, min(TeamSize) from (select record_maps.Map as Map, count(Name) as TeamSize from record_teamrace inner join record_maps on record_teamrace.Map = record_maps.Map where record_maps.Server = "DDmaX" group by ID) as l group by Map having min(TeamSize) > 2;
+---------------------+---------------+
| Map | min(TeamSize) |
+---------------------+---------------+
| NUT_hardcore_bestof | 3 |
| NUT_race4 | 3 |
| NUT_race8 | 3 |
| Picklock | 3 |
| lemonland | 3 |
| slow | 3 |
+---------------------+---------------+
6 rows in set (1.836 sec)
MariaDB [teeworlds]> select Map, avg(TeamSize) from (select record_maps.Map as Map, count(Name) as TeamSize from record_teamrace inner join record_maps on record_teamrace.Map = record_maps.Map where record_maps.Server = "DDmaX" group by ID) as l group by Map having avg(TeamSize) > 2 order by avg(TeamSize) desc limit 20;
+---------------------+---------------+
| Map | avg(TeamSize) |
+---------------------+---------------+
| NUT_short_race4 | 7.9648 |
| NUT_hardcore_bestof | 4.1607 |
| NUT Hardcore UNITED | 4.1400 |
| NUT_race4 | 4.0405 |
| skynet compilation | 3.9000 |
| Scabrous 2 | 3.6842 |
| NUT_hardcore_race4 | 3.6154 |
| NUT_race1 | 3.5586 |
| Inspire | 3.5172 |
| NUT_hardcore_race1 | 3.4737 |
| Picklock | 3.3889 |
| NUT_hardcore_race2 | 3.3784 |
| slow | 3.3740 |
| Nightmare | 3.3103 |
| At Night | 3.2600 |
| lemonland | 3.1951 |
| NUT_race8 | 3.1864 |
| Frats 5 | 3.1778 |
| DawnOfDust | 3.1273 |
| 3way | 3.1250 |
+---------------------+---------------+
20 rows in set (1.845 sec)