0% found this document useful (0 votes)
13 views3 pages

Lab Assignment 5 - SELECT Queries With Conditions

Uploaded by

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

Lab Assignment 5 - SELECT Queries With Conditions

Uploaded by

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

Lab Assignment 5 - SELECT Queries with

Conditions

Instructions
1. Answer the below question in the boxes.
2. Please submit the assignment through TalentLabs Learning System.

Open the Movies database


Follow the step illustrated in Chapter 3 to open the Movies database using DB Browser for
SQLite. You should see 5 tables in the database.
Query Exercises
For the exercises below, please write the required query and test in DB Browser for
SQLite. When you succeed, please copy and paste the query you used in the answer box.
You can reference the “Expected Output” for what is expected to come out from your query
execution.

1. Write a SQL query to list the titles of all movies released in 1990.
Expected Output: a table with a single column for the title of each movie.

2. Write a SQL query to determine the birth year of Benedict Cumberbatch.


You may assume that there is only one person in the database with the name
Benedict Cumberbatch.

Expected Output: a table with a single column and a single row (plus optional
header) containing Benedict Cumberbatch’s birth year.

3. Write a SQL query to list the titles of all movies with a release date on or after 2000,
in alphabetical order.

Expected Output: a table with a single column for the title of each movie.

4. Write a SQL query to determine the number of movies with an IMDb rating > 9.8.
Expected Output: a table with a single column and a single row (plus optional
header) containing the number of movies higher than 9.8 rating.

5. Write a SQL query to list the titles and release years of all Captain America movies,
in chronological order.
You may assume that the title of all Captain America movies will begin with the words
“Captain America”, and that if a movie title begins with the words “Captain America”,
it is a Captain America movie.

Expected Output: a table with two columns, one for the title of each movie and one
for the release year of each movie.

- End of Assignment -

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy