'Write Oracle SQL queries [closed]
how to rank each country based on number of people in SQL.
Solution 1:[1]
Try
SELECT * FROM (
SELECT country, count(people) as count FROM your_table GROUP BY country
) ORDER BY count DESC
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | JohanB |
