Question: 8. [4 points] Write a query that lists the theater name, phone and the number of movies played by the theaters in The U District
Consider a database with the following schema: 1. The movies table stores the movies played in theaters throughout the city. 2. The districts table stores the city districts where the movie theaters are located. 3. The theaters table stores movie theaters. 4. The movies2theaters table stores the movies and the corresponding theaters that play that movie. 5. The theaters2districts table lists the theaters and their districts; note that some theaters belong to several districts. Tables like movies2theaters and theaters2districts are sometimes called "junction" tables. They store foreign keys from main tables and connect them in this way. Junction tables are not usually meant to store any additional data/objects. Before you start answering the questions, it is helpful to understand the schema and browse the data. You could start by issuing a few trivial select * queries from tables in the schema (e.g. SELECT FROM movies;). You can use your home folder as temporary storage for your queries and result listings
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
