Answered step by step
Verified Expert Solution
Question
1 Approved Answer
We've created a table with all the 'Harry Potter' movies, with a sequel _ id column that matches the id of the sequel for each
We've created a table with all the 'Harry Potter' movies, with a sequel
id column that matches the id of the sequel for each movie. Issue a SELECT that will show the title of each movie next to its sequel's title
or NULL if it doesn't have a sequel
CREATE TABLE movies id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT,
released INTEGER,
sequelid INTEGER;
INSERT INTO movies
VALUES "Harry Potter and the Philosopher's Stone", ;
INSERT INTO movies
VALUES "Harry Potter and the Chamber of Secrets", ;
INSERT INTO movies
VALUES "Harry Potter and the Prisoner of Azkaban", ;
INSERT INTO movies
VALUES "Harry Potter and the Goblet of Fire", ;
INSERT INTO movies
VALUES "Harry Potter and the Order of the Phoenix ;
INSERT INTO movies
VALUES "Harry Potter and the HalfBlood Prince", ;
INSERT INTO movies
VALUES "Harry Potter and the Deathly Hallows Part ;
INSERT INTO movies
VALUES "Harry Potter and the Deathly Hallows Part NULL;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started