leetcode595.Big Countries

Read this "Within 1 minute".

Write a SQL solution to output big countries’ info
So here it is.I am beginning the LeetCode train in the difficulty order(through easy to hard).

Problem

595.png

Solution

This is a simply problem which using where and or is enough to solve.

select name, population, area
from World
where area > 3000000
or
population > 25000000;


After reading solutions, It seems where and union is also a kind of solution. Like the following:

select name, population, area
from world
where area > 3000000
union
select name, population, area
from world
where population > 25000000;

REFERENCE LINK : LeetCode


Quote Day
Getting up is half success to a day.

Author

Typing Theme

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempora non aut eos voluptas debitis unde impedit aliquid ipsa.

 The comment for this post is disabled.