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'
: