FAQ: Queries - Where

Community%20FAQs%20on%20Codecademy%20Exercises

This community-built FAQ covers the “Where” exercise from the lesson “Queries”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Web Development
Data Science

Learn SQL

FAQs on the exercise Where

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

What is the difference in using “WHERE genre = ‘romance’” compared to "WHERE genre IS ‘romance’. Both works

1 Like

Curious addition:

If you wanted to search database records based on two search conditions in the WHERE clause you can join them with AND and OR.

For example:

SELECT *
FROM movies
WHERE year > 2014 AND imdb_rating < 5;

Further info found here:

Is there any preference over != or <>?

Is there a way of using the WHERE clause and at the same time use an alias?
Ex:

SELECT *
FROM movies
WHERE imdb_rating < 5;

On the code above I want the result of my query to show all the columns of the movies table but only changing the “imdb_rating” to a “IMDB” alias, is there a way of doing this?