While ancient civilizations like those in Mesopotamia, Egypt, and Greece had systems for teaching specialized skills or knowledge to a select few, the development of mass schooling as we know it occurred much later and involved influences from various cultures.
So, there isn't a definitive answer to the question of which country invented schools.