← Questions

Total population of a city across zip codes in SQL

0
NvidiaCodingLast asked Feb 2026

Four tables describe geography: country, state, city and zip code, each pointing to its parent, and the population is stored per zip code. Write a query that returns the total population of a city given its name. Mind that the same city name can exist in several states or countries.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding