CBSE (Arts) Class 12CBSE
Share
Notifications

View all notifications

Write Sql Queries for (I) to (Iv) and Find Outputs for Sql Queries (V) to (Viii), Which Are Based on the Tables. to Display All Details from the Table Member in Descending Order of Issuedate to Display the Dtype and Number of Dvds in Each Dtype From the Table Dvd. Select Dtitle from Dvd Where Dtype Not in ("Folk", "Classical" ) ; - CBSE (Arts) Class 12 - Computer Science (Python)

Login
Create free account


      Forgot password?

Question

Write SQL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii), which are based on the tables.

DVD

DCODE DTITLE DTYPE
F101 Henry Martin Folk
C102 Dhrupad Classical
C101 The Planets Classical
F102 Universal Soldier Folk
R102 A day in life Rock

MEMBER

MID NAME DCODE ISSUEDATE
101 AGAM SINGH R102 2017-11-30
103 ARTH JOSEPH F102 2016-12-13
102 NISHA HANS C101 2017-07- 24

1) To display all details from the table MEMBER in descending order of ISSUEDATE

2) To display the DCODE and DTITLE of all Folk Type DVDs from the table DVD.

3) To display the DTYPE and number of DVDs in each DTYPE from the table DVD.

4) To display all NAME and ISSUEDATE of those members from the table. MEMBER who have DVDs issued (i.e., ISSUEDATE) in the year 2017

5) SELECT MIN(ISSUEDATE) FROM MEMBER

6) SELECT DISTINCT DTYPE FROM DVD;

7) SELECT D.DCODE, NAME, DTITLE FROM DVD D, MEMBER M WHERE D.DCODE=M.DCODE;

8) SELECT DTITLE FROM DVD WHERE DTYPE NOT IN ("Folk", "Classical" ) ;

Solution

1) SELECT * FROM MEMBER ORDER BY ISSUEDATE DESC;

2) SELECT DCODE, DTITLE FROM DVD WHERE DTYPE = “Folk”;

3) SELECT DTYPE, count (ALL DTYPE) FROM DVD;

4) SELECT NAME, ISSUEDATE FROM MEMBER WHERE ISSUEDATE >{2016-12-13}

5)

MID NAME DCODE ISSUE DATE
103 ARTH JOSEPH F102 2016-12-13

6) 

DTYPE
Rock
Folk
Classical

7) 

DCODE NAME DTITLE
R102 AGAM SINGH A day in the life
F102 ARTH JOSEPH Universal Soldier
C101 NISHA HANS The Planets

8)

DTITLE
A day in the life
  Is there an error in this question or solution?

APPEARS IN

Video TutorialsVIEW ALL [1]

Solution Write Sql Queries for (I) to (Iv) and Find Outputs for Sql Queries (V) to (Viii), Which Are Based on the Tables. to Display All Details from the Table Member in Descending Order of Issuedate to Display the Dtype and Number of Dvds in Each Dtype From the Table Dvd. Select Dtitle from Dvd Where Dtype Not in ("Folk", "Classical" ) ; Concept: Structured Query Language Advantages of Using SQL.
S
View in app×