SELECT cities.cityname, states.statename, countryname
FROM cities JOIN
states ON cities.states_id = states.id JOIN
country ON states.country_id = country.id
WHERE cities.id=3;
Assuming 3 is the id of the city you are searching for…
solved I need a sql query to view data