C05B – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  

Login
[lwa]



Q&A CBSE12A-2017-C05B #5797 siteicon  

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

(i) To display all details from the table MEMBER in descending order of ISSUEDATE.

(ii) To display the DCODE and DTITLE of all Folk Type DVDs from the table DVD

(iii) To display the DTYPE and number of DVDs in each DTYPE from the table DVD

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

(v) SELECT MIN(ISSUEDATE) FROM MEMBER;

(vi) SELECT DISTINCT DTYPE FROM DVD;

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

(viii) SELECT DTITLE FROM DVD
WHERE DTYPE NOT IN ( ” Folk ” , ” Classical ” );

Answer:

(i) SELECT * FROM MEMBER ORDER BY ISSUEDATE DESC;

(ii) SELECT DCODE,DTITLE FROM DVD WHERE DTYPE=’Folk’;

(iii) SELECT COUNT(*),DTYPE FROM DVD GROUP BY DTYPE;

(iv) SELECT NAME, ISSUEDATE FROM MEMBER WHERE
ISSUEDATE>=’2017-01-01’ AND ISSUEDATE<=’2017-12-31’;
OR
SELECT NAME, ISSUEDATE FROM MEMBER WHERE ISSUEDATE
BETWEEN ‘2017-01-01’ AND ‘2017-12-31’;
OR
SELECT NAME, ISSUEDATE FROM MEMBER WHERE ISSUEDATE LIKE
‘2017%’;
(v) MIN(ISSUEDATE)
2016-12-13
(vi) DISTINCT DTYPE
Folk
Classical
Rock

(vii)

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

(viii) DTITLE
A  day  in  life


Share

CSKC| Created: 3-Jan-2019 | Updated: 5-Jan-2019|CBSE12A-2017






×
ssignment Introductory Sessions Beginning to Program Tokens Keyword and Identifiers Data Types Variables and Constants Operators Simple User Input Building Expressions and Formulas Simple Real World Problems Simple If and If Else Multiple-Nested-Ladder of If Else Switch case selection Simple Loops Tricks in Loops - break continue scope Loop Applications - Handling numerals Series printing loops Nested Loops Pattern printing loops Number Varieties and Crunches String Handling (Null Terminated) Strings - string class type Functions (Built-in) Functions - user defined Functions Reference Passing/Returning Arrays Concepts and 1-D Arrays Array Data Management Two dimensional arrays and Matrices Structures Basics Structures passing/returning 2D Array Memory Addressing Display Using IO Manipulation Display Using C Formatting Tricks User Defined Data Types Enumerated Types Preprocessor Directives And Macros Exception Handling Programming Paradigms and OOPs Advantages Abstraction and Encapsulation Polymorphism Inheritance Function Overloading Concepts Function Overloading Varieties Function Overloading Special Cases Defining Classes Creating and Using Class Objects Class Members Accessibility Class Function Types Inline Functions Constant Functions Nesting of Functions Class Members Scope Resolution Static Members in a Class Array of Objects Constructor Concepts Default Constructor Parameterized Constructor Copy Constructor Constructor Overloading Destructors Inheritance Fundamentals Public Derivations Private and Protected Derivations Multiple Inheritance Multi-Level Inheritance Class Nesting Data File Concepts Handling Text Files Handling Binary Files Pointer Concepts Pointer and Arrays Pointers and Functions Object Pointers This Pointer Linked Lists Stacks Queues Introductory Sessions Beginning to Program Tokens Keywords Identifiers Literals Data Types Variables and Constants Operators (Arithmetic-Assignment-Unary-Relational-Logical) Expressions Statements and Formula Based Calculations BlueJ User Input Arguments through main Class Object Creation and Access Wrapper Classes Constructor Basics Constructor Overloading Conversion and Checking Functions Math Functions Function building and calling Function overloading Simple If and If-Else Selection Multiple Conditional Selections Switch Based Selections Basic Loop Types Compound or Nested Loops Jumping within loops Loop Variations Loop Applications - Handling Numerals Specially Named Numbers Series Printing Pattern Printing Scanner Input Buffered Input Array Basics Array Search Array Sorting Other Array Manipulations Two Dimensional Arrays Basics Two Dimensional Arrays Manipulations Character Handling String Basics String Class Functions StringBuffer StringBuilder Types of Errors Exceptions using try-catch Defining Classes Introductory Sessions Beginning to Program Introductory Sessions Beginning to Program Introductory Sessions Beginning to Program Data Types Variables and Constants Introductory Sessions Beginning to Program Python Basics Beginning To Program Tokens, Keywords, Identifiers Variables and Expressions Data Types Operators Building Expressions Collecting User Input elational nary)


Back