My LeetCode grinding. Trying to do a problem a day.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

12345678910111213141516171819202122232425
  1. There is a table World
  2. +-----------------+------------+------------+--------------+---------------+
  3. | name | continent | area | population | gdp |
  4. +-----------------+------------+------------+--------------+---------------+
  5. | Afghanistan | Asia | 652230 | 25500100 | 20343000 |
  6. | Albania | Europe | 28748 | 2831741 | 12960000 |
  7. | Algeria | Africa | 2381741 | 37100000 | 188681000 |
  8. | Andorra | Europe | 468 | 78115 | 3712000 |
  9. | Angola | Africa | 1246700 | 20609294 | 100990000 |
  10. +-----------------+------------+------------+--------------+---------------+
  11. A country is big if it has an area of bigger than 3 million square km or a population of more than 25 million.
  12. Write a SQL solution to output big countries' name, population and area.
  13. For example, according to the above table, we should output:
  14. +--------------+-------------+--------------+
  15. | name | population | area |
  16. +--------------+-------------+--------------+
  17. | Afghanistan | 25500100 | 652230 |
  18. | Algeria | 37100000 | 2381741 |
  19. +--------------+-------------+--------------+