I'm learning to write SQL queries in MySQL Workbench. At this moment I have two tables:
city table
country table
Is it possible to SELECT name of city With MAX population from city table which are in Continent of 'Europe', but without using Joins? (only using nested SELECT and Max() function)
Can't figure out how to work with two tables at the same time.
2条答案
按热度按时间mzaanser1#
Schematically (adjust names):
xqk2d5yq2#
SELECT Name FROM cities WHERE CountryCode IN ( SELECT Code FROM countries WHERE Continent = 'Europe') group by Name, countrycode having max(population)