Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, I have trouble coming up with SQL queries that satisfy these 4 questions. I have attached the ERD diagram for your reference. Can you

Hello,

I have trouble coming up with SQL queries that satisfy these 4 questions. I have attached the ERD diagram for your reference. Can you help me out with the queries?

  1. List the details for each director that directed any movie in 2010. Show the details for each director only once. Sort the output by director name.
  2. List the actor number for the actors that have had at least 2 roles in 2011.
  3. List the details for all directors that were born before the year 1960. Sequence the output by oldest to youngest.
  4. List the year the oldest Action movie was made.

image text in transcribed

actor actnumb: INTEGER NOT NULL role Appears in mvnumb: INTEGER NOT NULL (FK) actnumb: INTEGER NOT NULL (FK) actname: CHAR(20) NOT NULL birthplace: CHAR(20) NOT NULL yearbom: INTEGER NOT NULL yeardied: INTEGER NULL myfee: INTEGER NOT NULL "...!!!!!!!!!!!!.........!!!!!!!!!!!!!!!!!!!!!!!!!!!! Features T movie mynumb: INTEGER NOT NULL director dirnumb: INTEGER NOT NULL eos -- dirname: CHAR(20) NOT NULL yearborn: INTEGER NOT NULL yeardied: INTEGER NULL mvtitle: CHAR(30) NOT NULL yearmade: INTEGER NOT NULL mtype: CHAR(10) NOT NULL noms: INTEGER NOT NULL a wrds: INTEGER NOT NULL dirnumb: INTEGER NOT NULL (FK)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions