Vous êtes sur la page 1sur 2

ASSIGNMENT 3

DIRECTOR (NUMBER, LNAME, FNAME, BORN, DIED)


MOVIE (NUMBER, TITLE, TYPE, AANOM, AAWON, YEAR, CRITICS,
DIRECTOR)
STAR (LNAME, FNAME, NUMBER, BORN, DIED,CITY)
CUSTOMER (LNAME, FNAME, NUMBER, ADDRESS, RENTALS, BONUS,
JDATE)
TAPE (CODE, MOVIE, PDATE, TIMES, CUSTOMER, HIREDATE)
STARS (MOVIE, STAR, ROLE)
Q1. List full details of all movies.
Q2. Produce a list of all movies, showing only the movie number, title and director
number.
Q3. What is the name of customer number 104?
Q4. List the names of all directors born in or after 1940.
Q5. List the titles and numbers of all movies that have won at least one Academy Award
and have been made in or after 1968.
Q6. List the titles of all comedies or romantic.
Q7. List the titles of all movies that have a critics rating. Note that the fact that a movie
has not been rated is encoded in the database as 'NR'.
Q8. Produce a list of customer names, numbers and bonuses, under the assumption that
the BONUS attribute does not exists in the CUSTOMER table, but can be computed as
one tenth of the RENTALS attribute.
Q9. Produce a list of star numbers of all the stars that acted in the movie number 20.
Q10. List the numbers and titles of all movies made between 1960 and 1963.
Q11. List the nubmers and titles of all movies whose type is COMEDY or DRAMA.
Q12. For all customers who live in Ilam, list their number and name.
Q13. Retrieve the names of all directors born during the 1950s.
Q14. List the names of all directors who are still living.
Q15. List the titles of all movies, arranged in descending order of the number of
Academy Awards won.
Q16. List the numbers, names, addresses and join dates of all members. Sort the output
by last name descending and by first name ascending.
Q17. How many movies won more than four Academy Awards.
Q18. Find how many comedies there are and how many A+ they won.
Q19. Find the nubmer of movies in each category and the total of A+ won in each of

them. Show categories as well.


Q20. For each director, list the director's number and the total number of awards won by
comedies he or she directed if the total is greater than 1.
Q21. List the numbers and names of all members who have rented more tapes than
average.
Q22. List the titles of all movies directed by S kumar.
Q23. Retrieve the titles of all movies directed by S kumar.
Q24. Select all combinations of movie titles and tape codes.
Q25. List the names and addresses of all customers currently renting M brook' movies.
Q26. Find the nubmers and names of all directors who have directed at least one comedy.
Q27. List the names and numbers of all members. For those of them who are currently
renting tapes, list the total number of tapes.
Q28. List the movie number and title for all movies that were nominated for more
Academy Awards than any movie directed by ajad singh.
Q29. Find the list of any pairs of stars who have the same first name.
Q30. List the tape numbers of all tapes that have been rented at least 10 times.
Q31. List the numbers, names and ages of all movie stars who are deceased.
Q32. Find the number and name of the youngest director who has directed at least one
comedy.
Q33. For all directors who made more than 5 movies, list their number, names and
thetotal number of movies.
Q34. Show the number of movies of each type made in 1980.
Q35. Find the name of the director who have directed the most movies. Show the number
of movies as well.
Q36. Show types of movies for which there are more than 5 movies in the database.
Order the results by decreasing number of movies. The number of movies in each
category should be shown as a column names NO.
Q37. Find the names of all directors who directed at least as many movies as the director
number 0015.

Vous aimerez peut-être aussi