
SQL Queries
Authored by B H
Other
9th - 12th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
24 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Write a code for the following: Return all romances that have an imdb_rating over 6.
SELECT * FROM movies WHERE genre = ‘romance’ AND imdb_rating > 6;
SELECT * FROM movies WHERE genre = ‘romance’ AND imdb_rating < 6;
SELECT imdb_rating, name FROM movie WHERE genre = ‘romance’ AND imdb_rating > 6;
SELECT * FROM movies WHERE genre = romance and imdb_rating < 6;
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Write a code for the following: Return the names and imdb_ratings of all movies with ‘day’ in the name.
SELECT * FROM movies WHERE name LIKE ‘day’;
RETURN name, imdb_rating FROM movies WHERE name LIKE '%day%';
SELECT name, imdb_rating FROM movies WHERE name LIKE '%day%';
SELECT * FROM movies WHERE imdb_rating AND name LIKE ‘%day%’;
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
ANSWER: SELECT id, name, year FROM movies WHERE year > 2010;
ANSWER: SELECT id, name, year FROM movies WHERE year < 2010;
ANSWER: SELECT * FROM movies WHERE year > 2010;
ANSWER: SELECT id, name, year FROM movies WHERE YEAR > 2010;
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Return all dramas made after 2004.
SELECT * FROM movies WHERE genre = 'drama';
SELECT * FROM movies WHERE genre = 'drama' AND year > 2004;
SELECT * FROM movies WHERE genre = "drama' AND year < 2004;
SELECT * FROM movies WHERE imdb_rating = 7 AND LIMIT = 7
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Return the name and genre of each movie with an imdb_rating greater than 5 and year greater than 2012.
SELECT * FROM movies WHERE imdb_rating > 5 AND year > 2012;
SELECT name, genre FROM movies WHERE imdb_rating < 5 AND year < 2012;
SELECT name, year FROM movies WHERE imdb_rating > 5 year > 2012;
SELECT name, genre FROM movies WHERE imdb_rating > 5 AND year > 2012;
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is a special value in SQL that represents missing or unknown data?
%
?
NULL
*
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Return 2 movies with that include the word power.
SELECT * FROM movies WHERE name = ‘%power%’ LIMIT 2;
SELECT * FROM movies WHERE genre LIKE ‘%power%’ LIMIT 2;
SELECT * FROM movies WHERE name LIKE ‘%power%’ LIMIT 2;
SELECT * FROM games WHERE name LIKE ‘%power%’ LIMIT 2;
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?