CBSE Guess > Papers > Important Questions > Class XII > 2013 > Computer Science > Computer Science - by Mr. Sandip Kumar Srivastava
CBSE CLASS XII
Computer Science (C++ and Data Structure)
- Display a report containing cust_id, cust_name, Item,qty,price and bill amount. Bill
amount is calculated as the sum of qty*price
- Display how many customers have ordered Pizza in the month of March.
- Count the number of customer who have ordered item worth more than 1700. Total amount = sum of qty* price
- Display the name of customer along with their city in alphabetical order of city
- select Cust_name , City, ord_date from Client A, Bill b Where A.Cust_id =b.Cust_id;
- select Cust_name from Client where Cust_id=( Select Cust_id from Bill where Year(ord_date) =2008)
- select count(*) from Client group by City;
- select Distinct (Item) from Bill;
60.
- Explain Candidate key and Relation?
- Consider the following tables BOOKS and ISSUED. Write SQL commands for the statements (i) to (iv) and give outputs for SQL queries (v) to (viii)
Book_Id |
Book_Name |
Author_Name |
Publishers |
Price |
Type |
Quantity |
C01 |
Fast Cook |
Lata Kapoor |
EPB |
355 |
Cookery |
5 |
F01 |
The Tears |
William Hopkins |
First |
650 |
Fiction |
20 |
T01 |
My C++ |
Brain & Brooke |
FPB |
350 |
Text |
10 |
T02 |
C++ Brain |
A.W.Rossaine |
TDH |
350 |
Text |
15 |
F02 |
Thuderbolts |
Anna Roberts |
First |
750 |
Fiction |
50 |
BOOKS ISSUED
Book_Id |
Quantity_Issued |
T01 |
4 |
C01 |
5 |
F01 |
2 |
C01 |
6 |
T02 |
3 |
- To list the names from books of Text type.
- To display the names and price from books in ascending order of their price.
- To increase the price of all books of EPB publishers by 50.
- To display the Book Name, Quantity_Issued and Price for all books of EPB publishers.
- Select max (price) from books;
- Select count (DISTINCT Publishers) from books where Price >=400;
- Select Book_Name, Author_Name from books where Publishers = ‘First’;
- Select min(Price) from books where type = ‘Text’;
Submitted By : Mr. Sandip Kumar Srivastava
Email : [email protected] |
|