List the movies which have more than one director

Assignment Help PL-SQL Programming
Reference no: EM131310314

Writing SQL statements.

1. For each movie category, show the number of movies in the database of that category, the total number (sum) of nominations (NOMS) and the average length of that type. Include only those categories for which there are more than 5 movies in the database (i.e. use having). List the output with the greatest number of movies shown first (i.e. the highest count).

2. List the names (first and last) of stars, who are also directors. Include the star's director number in the results. Please note: the director may not have starred in the movie he/she directed, but has been a star in at least one movie and directed as least one movie.

3. List the movies which have more than one director. Include the year, title, last and first name of directors. Sort the output by last name within title. (use subquery)

4. List the movie titles that won both best actor and best actress awards.

5. List the countries (name) where no star was born. (the country name should be listed only once).

6. List the last and first names of all directors who have directed only one movie.

Movies Database

The following is an explanation of the columns in the tables in the Movie Database.

DIRECTOR (DirNum, CntryID, DirBorn, DirDied, Sex, LastName, FirstName)
DirNum - a unique numeric identifier for each director.
CntryID - Code for the country of birth. (Foreign key referencing COUNTRY).
DirBorn -The director's date of birth (mm/dd/yyyy). Some dates are prior to 1900. Null if unknown.
DirDied - date of death if deceased, otherwise null.
Sex - Gender of the director (M or F).
LastName - Director's last name.
FirstName - Director's first name.
MOVIE (MvNum, MvTitle, MvYear, CatID, MPAA, Len, Noms, Awrds, WWGross, USGross,

NonUSGross, CntryID, DirNum, BestDir, BestPic, BestEdit, BestFor, BestWrite)
MvNum - a unique numeric identifier for each movie.
MvTitle - The official title of the movie
MvYear - Usually, the year of release in the U.S. For some foreign movies, the release date in the originating country may have been a year earlier.

CatID - a 3-character code for the category of the movie. This is a foreign key referencing the CATEGORY table which contains an explanation of a code.

MPAA - Designates the U.S. rating of the system: R, PG13, PG, etc. Only movies released since the late 1960's are rated: older ones are coded NR.

Len - An integer representing the movie's length in minutes of running time.
Noms - An integer representing the number of Academy Awards for which the movie was nominated.
Awrds - An integer for the number of Academy Awards actually won.
WWGross - The movie's worldwide gross, in thousands of dollars (as of 12/31/2004).
USGross - The movie's U.S. gross, in thousands of dollars (as of 12/31/2004).
CntryID - A 2- or 3-character code for the country which produced the movie. A foreign key referencing the COUNTRY table.
DirNum - A foreign key referencing the Director table.
BestDir - A W in this column means that the movie won the Oscar for Best Director for the year of release. An N indicates a nomination for the Oscar but it did not win.
BestPic - W for Best Picture Oscar; N for nominee.
BestEdit - W for the Oscar for best editing; N for nominee.
BestFor - W for the Oscar for best foreign movie; N for nominees.
BestWrite - W for best writing; N for nominees.
MOVDIR (MVNUM, DIRNUM)
(MVNUM, DIRNUM) - composite primary key
MVNUM - A foreign key referencing the Movie table
DIRNUM - A foreign key referencing the Director table.
STAR (StarNum, CntryID, StarBorn, StarDied, Sex, DeathCause, FirstName, LastName, BirthCity,

BirthState)

StarNum - A unique numeric identifier for a movie actor.

CntryID - A 2- or 3-character code for the country where the star was born. A foreign key referencing the COUNTRY table.
StarBorn - Date of birth of the star: mm/dd/yyyy. May be null.
StarDied - Date of death if deceased.
Sex - Gender of the star ( M or F).
DeathCause - If the actor is deceased, the cause of death is indicated here.
FirstName - Star's first name.
LastName - Star's last name.
BirthCity - City where the star was born; e.g. New York. If born in Canada, the province is also given: e.g. Montreal, Quebec.
BirthState - State where the star is born.
MOVSTAR ( MvNum, StarNum, BestM, BestF, SupM, SupF)
MvNum - part of the primary key; also a foreign key referencing MOVIE.
StarNum - part of the primary key; also a foreign key referencing STAR.
BestM - A W in this column indicates an Oscar for Best Male Actor for this star. N indicates a nomination for this award.
BestF - W for the Oscar for Best Female Actress; N for the nomination
SupM - W for the Oscar for Best Supporting Male Actor; N for nominees.
SupF - W for the Oscar for Best Supporting Female Actress; N for nominees.
CATEGORY ( CatId, CategoryDesc)
Catid - A 3-character code for the category of the movie.
CategoryDesc - description for the category code.
COUNTRY (CntryID, CountryName)
CntryID - A 2-or 3-characert code for the country.
CountryName - the name of the country.

Reference no: EM131310314

Questions Cloud

Determine the expected time to meet this probability : The system administrators want to expire passwords once they have a probability of 0.10 of having been guessed. Determine the expected time to meet this probability under each of the following conditions.
Explain how logistics performance is crucial to jit : Why would a companys costs of manufacturing and procurement tend to increase as the firm changes from an MTP to an MTO strategy?
Critique the components of your talent management strategy : Evaluate the effectiveness of the roles that the strategic leaders played in the formation of the performance management strategy.Develop a five (5) point criteria for evaluating the effectiveness of the talent management strategy and how the dat..
Compare and contrast economic market and relevancy value : Explain the folIowing statement: "The methodology is systems analysis and the theoretical framework is the systems concept."
List the movies which have more than one director : List the movies which have more than one director. Include the year, title, last and first name of directors. Sort the output by last name within title. (use subquery)
What is the meaning of the phrase cradle to cradle logistics : What is the meaning of the phrase cradle-to-cradle logistics? Discuss the operational differences of original versus reverse logistics.
What creates power in context of supply chain collaboration : What creates power in the context of supply chain collaboration? Why do many observers feel power is shifting forward or closer to end consumers in many supply chain arrangements?
Discuss about the risk management perspective : Discuss about the risk management perspective.Policy and procedures act as guidelines for hospitals; they give the people proper relationship with the hospital since they see that they can be reliable and that they are well organized.
Problem regarding the database controls : Based on your research conducted earlier in this unit, identify the types of controls that are available to mitigate some of the vulnerabilities, threats, and risks you identified in the Unit 5 discussion.

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Prepared statements in php

One of the method of preventing SQL injection is by using prepared Statements in PHP. Using that concept write a snippet you would use to add users to a MySQL database from a web-form.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Convert requirement to logic and then to sql

Prepare the SQL query for each of given requirements. Convert requirement to logic, then to SQL. Illustrate the names of all products which have been sold.

  Write the sql code to perform the tasks

Write the SQL code to perform the tasks requested in each problem. Screenshots are required for each SQL statement for a grade to be given.

  Alter the employee table to establish a foreign key

Alter the Employee table to establish a foreign key between Employees and Departments.

  Possible advantages of utilizing pl-sql

A good IT professional is able to be versatile in SQL programming styles. Identify at least two possible advantages of utilizing PL/SQL instead of standard SQL Syntax.

  An er diagram for the system

An ER diagram for the system. Show all entities, relationships, cardinalities and optionalities. Also, include all intersection entities. You must use the Finkelstein methodology as per the study book and tutorials.

  Create a text file called yourstudentid

Create a text file called YourStudentId-Create.sql (format xxxxxxx-Create.sql) for example 2225991- Create.sql that will.

  Online banking to mobile devices

Identify concerns you feel the bank will need to focus on because of expanding its online banking to mobile devices and opening its international branch office. Identify three areas where you will need to apply security controls to manage the risk..

  Please create the tables with appropriate

Please create the tables with appropriate primary keys & foreign keys - Insert at least three rows of data to each table. Make sure you keep the primary key and foreign key constraints.

  Provide four queries to answer questions asked by end users

Explain how you will go about developing this database. Provide at least four queries that answer some of the questions asked by the end users.

  Create queries in sql

Create queries in SQL that will provide the data to answer the business questions (they are listed below). In addition, create a Data Dictionary for the tables

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd