Practice WHERE with Pagila
Practice WHERE with Pagila Data Science Project
Beginning SQL: Basic Selection Statements

Practice WHERE with Pagila

Join our SQL lab using the Pagila database to enhance your data querying skills. Through hands-on exercises, learn to select, filter, and analyze data efficiently. Master SQL essentials and prepare for advanced database management and data analysis tasks. Dive in and turn data into insights!
Start this project
Practice WHERE with PagilaPractice WHERE with Pagila
Project Created by

Anurag Verma

Project Activities

All our Data Science projects include bite-sized activities to test your knowledge and practice in an environment with constant feedback.

All our activities include solutions with explanations on how they work and why we chose them.

codevalidated

Films which have rating `PG`

Write a query to select only title, rental_duration, rental_rate, and replacement_cost columns from the film table where the rating is PG.

Your result should look like this:

ACTIVITY 01

There are more rows in the result than shown in the image.

codevalidated

Not active customers.

Write a query to select only first_name, last_name, email, and active columns from the customer table where the active column is 0.

Your result should look like this:

ACTIVITY 02

There are more rows in the result than shown in the image.

codevalidated

Find all cities for country `Brazil`.

Write a query to select only city, and last_update columns from the city table where country is Brazil.

Your result should look like this:

ACTIVITY 03

There are more rows in the result than shown in the image.

codevalidated

All address from district `Texas`

Write a query to select all the columns from the address table where the district is Texas.

Your result should look like this:

ACTIVITY 04

codevalidated

Addresses that do not have postal code

Write a query to select address, district, and city_id and postal_code from the address table where the postal_code is not empty.

Your result should look like this:

ACTIVITY 05

There are more rows in the result than shown in the image.

codevalidated

Film where `replacement_cost` less than `$20`

Write a query to select title, rental_duration, rental_rate, and replacement_cost from the film table where the replacement_cost is less than $20.

Your result should look like this:

ACTIVITY 06

There are more rows in the result than shown in the image.

codevalidated

Films where rental duration not equal to 4.

Write a query to select title, rental_duration, rental_rate, and replacement_cost from the film table where the rental_duration is not equal to 4.

Your result should look like this:

ACTIVITY 07

There are more rows in the result than shown in the image.

codevalidated

High length movies.

Write a query to select title, rental_duration, rental_rate, and replacement_cost from the film table where the length is greater than 120.

Your result should look like this:

ACTIVITY 08

There are more rows in the result than shown in the image.

Practice WHERE with PagilaPractice WHERE with Pagila
Project Created by

Anurag Verma

What's up, friends! 👋 I'm a computer science student about to finish my last year of college. 🎓 I LOVE writing code! ❤️ It makes me so happy! 😄 Whether I'm goofing in notebooks 📓 or coding in Python 🐍, writing programs is a blast! 💥

What's up, friends! 👋 I'm a computer science student about to finish my last year of college. 🎓 I LOVE writing code! ❤️ It makes me so happy! 😄 Whether I'm goofing in notebooks 📓 or coding in Python 🐍, writing programs is a blast! 💥

This project is part of

Beginning SQL: Basic Selection Statements

Explore other projects