0% found this document useful (0 votes)
32 views1 page

Filtering Results: Datacamp

This document discusses filtering results in SQL. It explains that the WHERE keyword allows you to filter based on text and numeric values in a table. It lists some common comparison operators like =, <, >, <=, >= that can be used. An example is provided to filter and return all films with the title 'Metropolis' using WHERE title = 'Metropolis'. It also notes that the WHERE clause always comes after the FROM statement and <> is used instead of != for the not equal operator according to SQL standards.

Uploaded by

veroooanrain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views1 page

Filtering Results: Datacamp

This document discusses filtering results in SQL. It explains that the WHERE keyword allows you to filter based on text and numeric values in a table. It lists some common comparison operators like =, <, >, <=, >= that can be used. An example is provided to filter and return all films with the title 'Metropolis' using WHERE title = 'Metropolis'. It also notes that the WHERE clause always comes after the FROM statement and <> is used instead of != for the not equal operator according to SQL standards.

Uploaded by

veroooanrain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Filtering results | Sql 8/16/18, 10(51 PM

DataCamp ! " Course Outline # $ %

Filtering results
Congrats on finishing the first chapter! You now know how to select columns and perform basic
counts. This chapter will focus on filtering your results.

In SQL, the WHERE keyword allows you to filter based on both text and numeric values in a
table. There are a few different comparison operators you can use:

= equal
<> not equal
< less than
> greater than
<= less than or equal to
>= greater than or equal to

For example, you can filter text records such as title . The following code returns all films
with the title 'Metropolis' :

SELECT title
FROM films
WHERE title = 'Metropolis';

Notice that the WHERE clause always comes after the FROM statement!

Note that in this course we will use <> and not != for the not equal operator, as per the
SQL standard.

What does the following query return?

SELECT title

https://campus.datacamp.com/courses/intro-to-sql-for-data-science/filtering-rows?ex=1 Page 1 of 1

You might also like