Is this what you are looking for: mysql> SELECT country, AVG(lat), AVG(lng) FROM c2014 GROUP BY country; +---------+---------------------+---------------------+ | country | AVG(lat) | AVG(lng) | +---------+---------------------+---------------------+ | ad | 42.527902188508406 | 1.537318801102431 | | ae | 24.891538320635465 | 55.51244805853463 | | af | 34.04674051673764 | 67.26681304757301 | | ag | 17.085518998526485 | -61.79143601297681 | | ai | 18.21587371826172 | -63.039283025832404 | | al | 41.088975844950475 | 20.014610561816568 | | am | 40.26937918217537 | 44.84238364011771 | | an | 13.779007457889145 | -67.10738386983765 | | ao | -10.394024888552527 | 16.401272589394896 | | ar | -32.13739248870794 | -63.40704697093584 | | at | 47.62893757137828 | 14.375785999308414 | | au | -32.58224675171816 | 144.07049698825728 | | aw | 12.509566132918648 | -69.99144844386889 | | az | 40.179647407439965 | 47.49281764155795 | | ba | 44.13574533529882 | 17.93174898133396 | | bb | 13.1662623028257 | -59.554101581004126 | ... | yt | -12.817898351638043 | 45.14693607267786 | | za | -29.213355151321988 | 27.271365789847575 | | zm | -13.74802438257624 | 27.937999186534476 | | zr | -3.150024081275917 | 23.1336162007831 | | zw | -19.047764062703678 | 29.515317293888238 | +---------+---------------------+---------------------+ 234 rows in set (1.22 sec)