Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Using the AND Operator | Advanced Data Filtering
Introduction to SQL
course content

Kurssisisältö

Introduction to SQL

Introduction to SQL

1. Retrieving Data
2. Sorting Retrieved Data
3. Filtering Data
4. Advanced Data Filtering
5. Aggregate Functions

book
Using the AND Operator

When you want to filter results using more than one column, you can chain conditions together with the AND operator in the WHERE clause. Here’s an example:

123
SELECT name, population, region FROM country WHERE population >= 1000000 AND continent ='Europe';
copy

This query returns only the rows that meet both conditions: the country’s population is at least 1000000, and it’s located in Europe.

Here is the country table we are working with:

Tehtävä

Swipe to start coding

From the country table, retrieve only countries' names (column name) from Asia (can be checked in column continent) with a population greater than 1000000 (can be checked in column population).

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 4. Luku 1
toggle bottom row

book
Using the AND Operator

When you want to filter results using more than one column, you can chain conditions together with the AND operator in the WHERE clause. Here’s an example:

123
SELECT name, population, region FROM country WHERE population >= 1000000 AND continent ='Europe';
copy

This query returns only the rows that meet both conditions: the country’s population is at least 1000000, and it’s located in Europe.

Here is the country table we are working with:

Tehtävä

Swipe to start coding

From the country table, retrieve only countries' names (column name) from Asia (can be checked in column continent) with a population greater than 1000000 (can be checked in column population).

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 4. Luku 1
Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Pahoittelemme, että jotain meni pieleen. Mitä tapahtui?
some-alt