Please write a SELECT statement to display each DVD title with its # of copy in the DVD table. DVD titles must have at least two  ‘A’s. Please display the result in descending order of title’s number copy. The result should be identical to below results:

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Q1 Please write SQL codes to query data from dvd table based on below criteria 

Please write a SELECT statement to display each DVD title with its # of copy in the DVD table. DVD titles must have at least two  ‘A’s. Please display the result in descending order of title’s number copy. The result should be identical to below results:

[screenshot] 

Here is the DVD TABLE:

CREATE TABLE DVD (
   dvd_ID NUMBER(4) NOT NULL,
   title_ID NUMBER(3) NOT NULL,
   title VARCHAR2(20) NOT NULL,
   status VARCHAR2(10) NOT NULL,

   CONSTRAINT dvd_pk PRIMARY KEY (dvd_ID)
);

this is all the data in the DVD table

CREATE SEQUENCE DVD_SEQ
   START WITH 1000
   INCREMENT BY 1
   MINVALUE 1000
   MAXVALUE 9999
   NOCYCLE
   CACHE 50;

INSERT INTO DVD VALUES (DVD_SEQ.nextval, 10, 'IN STORE', 'DANCE WITH WOLF');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 10, 'IN STORE', 'DANCE WITH WOLF');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 11, 'IN STORE', 'THE PERFECT STROM');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 11, 'IN STORE', 'THE PERFECT STROM');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 12, 'IN STORE', 'CHICKEN RUN');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 13, 'IN STORE', 'THE BUGS LIFE');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 13, 'IN STORE', 'THE BUGS LIFE');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 14, 'IN STORE', 'SNOW WHITE');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 14, 'IN STORE', 'SNOW WHITE');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 15, 'IN STORE', 'TOY STORY I');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 16, 'IN STORE', 'TOY STORY II');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 17, 'IN STORE', 'LOVE STORY');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 18, 'IN STORE', 'AIR FORCE ONE');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 18, 'IN STORE', 'AIR FORCE ONE');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 19, 'IN STORE', 'AWAY FROM AFRICA');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 20, 'OUT STORE', 'FRIDAY 13THF');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 21, 'IN STORE', 'SILENT LAMB');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 22, 'IN STORE', 'SHAN HI MOON');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 22, 'IN STORE', 'SHAN HI MOON');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 23, 'IN STORE', 'THE GOLDAN POND');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 23, 'IN STORE', 'THE GOLDAN POND');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 24, 'IN STORE', 'POKIMON I');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 25, 'IN STORE', 'POKIMON II');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 25, 'IN STORE', 'POKIMON II');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 26, 'IN STORE', 'SLEEPY BEAUTY');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 26, 'IN STORE', 'SLEEPY BEAUTY');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 27, 'IN STORE', 'TOY STORY I');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 28, 'IN STORE', 'THE MELODY');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 29, 'IN STORE', 'LOVE STORY II');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 30, 'IN STORE', 'CINDERALA');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 30, 'IN STORE', 'CINDERALA');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 31, 'IN STORE', 'THE GIRASIC PARK');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 32, 'IN STORE', 'BACK TO GIRASIC PARK');
INSERT INTO DVD VALUES (DVD_SEQ.nextval, 33, 'IN STORE', 'THE GARZELA');

ΤΙTLE ΝΑΜΕ
NUMBER COPY
CINDERALA
2
THE GIRASIC PARK
2
BACK TO GIRASIC PARK
AWAY FROM AFRICA
4
THE GARZELA
2
Transcribed Image Text:ΤΙTLE ΝΑΜΕ NUMBER COPY CINDERALA 2 THE GIRASIC PARK 2 BACK TO GIRASIC PARK AWAY FROM AFRICA 4 THE GARZELA 2
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education