Unit 10: Databases

Based off the table we had to write sql statements:

SQL Question:

Table: Movies
Id Title Director Year Length_minutes
1 Toy Story John Lasseter 1995 81
2 A Bug's Life John Lasseter 1998 95
3 Toy Story 2 John Lasseter 1999 93
4 Monsters, Inc. Pete Docter 2001 92
5 Finding Nemo Andrew Stanton 2003 107
6 The Incredibles Brad Bird 2004 116
7 Cars John Lasseter 2006 117
8 Ratatouille Brad Bird 2007 115
9 WALL-E Andrew Stanton 2008 104
10 Up Pete Docter 2009 101

Given the above table, write the following 3 SQL statements:

  1. Find all information about each film:
    SELECT * FROM Movies;
  2. Find title and year of each film:
    SELECT Title, Year FROM Movies;
  3. Find all the directors involved without repetition of names:
    SELECT DISTINCT Director FROM Movies;

I wrote the above SQL statements.