Support ongoing development - donate to help us maintain and improve the platform. 🖥️ Support sqltest →
SQL code copied to buffer
Task 158:

Top states by population

SQL Server 2022
Determine the top 3 states in the United States with the highest population based on the number of addresses in the Address table.
Output the table with columns StateProvince and PopulationPersentage showing the top 3 states with their corresponding population percentages (of total Addresses in United States). Order it by percentages in descending order.
Expected result Columns: 2 · Rows: 3
StateProvince PopulationPersentage

Write your query below and click "Check it!". Tables are described in the right pane.

The query result will appear here. Ctrl+Enter - Run query

Hi! Could we please enable some services and cookies to improve your experience and our website?

Privacy & Cookie Policy.