What is the correct query that would generates movies and the actors in the movies (hint: you need to delete a part of the SQL code)?

SELECT Movies.Title, Movies.Score, Actors.Name

FROM Actors INNER JOIN Movies ON Actors.[Actor_id] = Movies.[Director];

  1. Copy and paste the first 15 records of the table from the correct SQL code for "Movie Titles and Actors".
Movies Запрос
Title Score Name
10 Things I Hate About You 7,1 GilJunger
101 Dalmatians 5,7 StephenHerek
12 AngryMen 8,6 SidneyLumet
13th Warrior, The 6,2 JohnMcTiernan
1492: ConquestofParadise   RidleyScott
2 DaysintheValley 6,4 JohnHerzfeld
20,000 LeaguesUndertheSea 7,1 RichardFleischer
200 Cigarettes 5,3 RisaBramonGarcia
2001: A SpaceOdyssey 8,3 StanleyKubrick
28 Days 6,3 BettyThomas (I)
3 Men and a Little Lady 4,5 Emile Ardolino
39 Steps, The   Alfred Hitchcock
48 Hrs. 6,7 Walter Hill
8MM   Joel Schumacher
About Last Night... 5,8 Edward Zwick

Optional Question 3. Additional Query Tasks

Using the database setup created for Question 2, try to answer the following questions.

A. Display the SQL code for the query, movies in which the director also acted.

SELECT Movies.Title, Movies.Score, Actors.Name

FROM Actors INNER JOIN Movies ON Actors.[Actor_id] = Movies.[Director];

B. Display the SQL code for the query, movies in which Kevin Costner acted.

Movies Запрос1
Title Name
Postman, The KevinCostner
DanceswithWolves KevinCostner

C. Display the SQL for the query, actors who have co-stared with Kevin Costner in Dances with Wolves.

Actors
Actor_id Name
  Kevin Costner
  Maury Chaykin
  Mary McDonnell
  Charles Rocket
  Graham Greene (II)
  Robert Pastorelli
  Tantoo Cardinal
  Rodney A. Grant
  Floyd 'Red Crow' Westerman

 

 


Понравилась статья? Добавь ее в закладку (CTRL+D) и не забудь поделиться с друзьями:  



double arrow
Сейчас читают про: