I have the following database in sqlite and want to answer the questions below by writing sqlite codes to proof the correct answers %load_ext sql %%sql  sqlite:///TMDB.db I want to use the database to answer the following questions by writing SQLite codes to answer each question: Question 1. What is the primary key for the table “movies”? Question 2 How many foreign keys does the “LanguageMap” table have? Question 3 How many movies in the database were produced by Pixar Animation Studios?

A Guide to SQL
9th Edition
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Philip J. Pratt
Chapter8: Sql Functions And Procedures
Section: Chapter Questions
Problem 9CAT
icon
Related questions
Question

I have the following database in sqlite and want to answer the questions below by writing sqlite codes to proof the correct answers

%load_ext sql

%%sql 

sqlite:///TMDB.db

I want to use the database to answer the following questions by writing SQLite codes to answer each question:

Question 1.

What is the primary key for the table “movies”?

Question 2

How many foreign keys does the “LanguageMap” table have?

Question 3

How many movies in the database were produced by Pixar Animation Studios?

Question 4

What is the most popular action movie that has some German in it? (Hint: The German word for German is Deutsch)

Question 5

In how many movies did Tom Cruise portray the character Ethan Hunt? (Hint: Characters are listed in the Casts table.)

Question 6

How many times was the actress Cate Blanchett nominated for an Oscar?

Question 7

How many movies were nominated for the Best Picture award at the 2015 Oscars?

Question 8

How many movies contain at least one of the languages, Afrikaans or Zulu?

Question 9

In which country was the movie “Star Wars” produced?

Question 10

How many movies are in the database that are both a Romance and a Comedy?

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Question 4

What is the most popular action movie that has some German in it? (Hint: The German word for German is Deutsch)

Question 5

In how many movies did Tom Cruise portray the character Ethan Hunt? (Hint: Characters are listed in the Casts table.)

Question 6

How many times was the actress Cate Blanchett nominated for an Oscar?

Question 7

How many movies were nominated for the Best Picture award at the 2015 Oscars?

Question 8

How many movies contain at least one of the languages, Afrikaans or Zulu?

Question 9

In which country was the movie “Star Wars” produced?

Question 10

How many movies are in the database that are both a Romance and a Comedy?

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Intermediate SQL concepts
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning