I have a table which contains 2 columns { Names of cities and Info}
Name Info
Qandahar {"Population": 237500}
Kabul {"Population": 1780000}
Herat {"Population": 186800}
Mazar-e-Sharif {"Population": 127800}
Amsterdam {"Population": 731200}
Rotterdam {"Population": 593321}
and so on. I tried to sort it by Population but this does not work
SELECT Name,Info ORDER BY CAST(SUBSTRING(Info, 16, LENGTH(Info)-16) AS INT) FROM city
but it outputs nothing. I get ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INT) FROM city' at line 1.