LeetCode刷题#595

来源:互联网 发布:四年级英语辅导软件 编辑:程序博客网 时间:2024/06/02 00:56

#595 Big Countries

1. Problem Description

There is a table World
Markdown

A country is big if it has an area of bigger than 3 million square km or a population of more than 25 million.

Write a SQL solution to output big countries’ name, population and area.

For example, according to the above table, we should output:
Markdown

2. My Codes

select name, population, areafrom Worldwhere area > 3000000 or population > 25000000

for mysql

3.Answers

  1. same as my codes
  2. use union , and faster
原创粉丝点击