C04B-2017 – Computer Sir Ki Class

Login


Lost your password?

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

Login
[lwa]



Q&A CBSE12D-2017-C05B #6057 siteicon  

Question:

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

Code BNAME TYPE
F101 The priest Fiction
L102 German easy Literature
C101 Tarzan in the lost world Comic
F102 Untold Story Fiction
C102 War Heroes Comic

TABLE: MEMBER

MNO MNANE CODE ISSUEDATE
M101 RAGHAV SINHA L102 2016-10-13
M103 SARTHAK JOHN F102 2017-02-23
M102 ANISHA KHAN C101 2016-06-12

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

(ii) To display the BNO and BNAME of all Fiction Type books from the table BOOK

(iii) To display the TYPE and number of books in each TYPE from the table BOOK

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

(v) SELECT MAX(ISSUEDATE) FROM MEMBER;

(vi) SELECT DISTINCT TYPE FROM BOOK;

(vii) SELECT A.CODE,BNAME,MNO,MNAME FROM BOOK A, MEMBER B
WHERE A.CODE=B.CODE ;

(viii) SELECT BNAME FROM BOOK
WHERE TYPE NOT IN (“FICTION”, “COMIC”);

Answer:

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

(ii) SELECT Code,BNAME FROM BOOK WHERE TYPE=’Fiction’;
OR
SELECT BNO,BNAME FROM BOOK WHERE TYPE=’Fiction’;

(iii) SELECT COUNT(*),TYPE FROM BOOK GROUP BY TYPE;

(iv) SELECT MNAME, ISSUEDATE FROM MEMBER WHERE
ISSUEDATE>=’2017-01-01′ AND ISSUEDATE<=’2017-12-31′;
OR
SELECT MNAME, ISSUEDATE FROM MEMBER WHERE ISSUEDATE
BETWEEN ‘2017-01-01’ AND ‘2017-12-31’;
OR
SELECT MNAME, ISSUEDATE FROM MEMBER WHERE ISSUEDATE
LIKE ‘2017%’;

(v)

MAX(ISSUEDATE)
2017-02-23

(vi)

DISTINCT TYPE
Fiction
Literature
Comic

(vii)
CODE     BNAME                               MNO   MNAME
L102      The priest                            M101   RAGHAV SINHA
F102      Untold Story                       M103   SARTHAK JOHN
C101      Tarzan in the lost world    M102   ANISHA KHAN

(viii)
BNAME
German Easy
OR
BNAME
The priest
German easy
Tarzan in the lost world
Untold Story
War heroes


Share

CSKC| Created: 9-Jan-2019 | Updated: 14-Jan-2019|CBSE12D-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