The WHERE Clause Operators
SQL supports a lot of conditional statements.
Less Than
Let's look at the examples:
This example lists all countries that have a population of less than 2424200:
123SELECT name, population FROM country WHERE population < 2424200;
Less Than or Equal to
The following example retrieves all countries with a population less than or equal to 2424200:
123SELECT name, population FROM country WHERE population <= 2424200;
Not Equal
The following example retrieves all non-Asian countries:
123SELECT name, continent FROM country WHERE continent<>'Asia';
Swipe to start coding
Write an SQL query to retrieve the name
, population
, region
, and capital
columns from the country
table (please retrieve these columns in this order), returning only the countries with a region
named Southern Europe
.
Solution
Thanks for your feedback!
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 2.44Awesome!
Completion rate improved to 2.44
The WHERE Clause Operators
SQL supports a lot of conditional statements.
Less Than
Let's look at the examples:
This example lists all countries that have a population of less than 2424200:
123SELECT name, population FROM country WHERE population < 2424200;
Less Than or Equal to
The following example retrieves all countries with a population less than or equal to 2424200:
123SELECT name, population FROM country WHERE population <= 2424200;
Not Equal
The following example retrieves all non-Asian countries:
123SELECT name, continent FROM country WHERE continent<>'Asia';
Swipe to start coding
Write an SQL query to retrieve the name
, population
, region
, and capital
columns from the country
table (please retrieve these columns in this order), returning only the countries with a region
named Southern Europe
.
Solution
Thanks for your feedback!
single
Awesome!
Completion rate improved to 2.44
The WHERE Clause Operators
Swipe to show menu
SQL supports a lot of conditional statements.
Less Than
Let's look at the examples:
This example lists all countries that have a population of less than 2424200:
123SELECT name, population FROM country WHERE population < 2424200;
Less Than or Equal to
The following example retrieves all countries with a population less than or equal to 2424200:
123SELECT name, population FROM country WHERE population <= 2424200;
Not Equal
The following example retrieves all non-Asian countries:
123SELECT name, continent FROM country WHERE continent<>'Asia';
Swipe to start coding
Write an SQL query to retrieve the name
, population
, region
, and capital
columns from the country
table (please retrieve these columns in this order), returning only the countries with a region
named Southern Europe
.
Solution
Thanks for your feedback!