Class - 12 CBSE Computer Science Important Output Questions 2025
SQL Queries
Consider the table CLUB given below and write the output of the SQL queries that follow.
CID CNAME AGE GENDER SPORTS PAY DOAPP 5246 AMRITA 35 FEMALE CHESS 900 2006-03-27 4687 SHYAM 37 MALE CRICKET 1300 2004-04-15 1245 MEENA 23 FEMALE VOLLEYBALL 1000 2007-06-18 1622 AMRIT 28 MALE KARATE 1000 2007-09-05 1256 AMINA 36 FEMALE CHESS 1100 2003-08-15 1720 MANJU 33 FEMALE KARATE 1250 2004-04-10 2321 VIRAT 35 MALE CRICKET 1050 2005-04-30 (i) SELECT COUNT(DISTINCT SPORTS) FROM CLUB;
(ii) SELECT CNAME, SPORTS FROM CLUB WHERE DOAPP<"2006-04-30" AND CNAME LIKE "%NA";
(iii) SELECT CNAME, AGE, PAY FROM CLUB WHERE GENDER = "MALE" AND PAY BETWEEN 1000 AND 1200;
View Answer1 Likes
SQL Queries
Give output for following SQL queries as per given table(s) :
Table : GARMENT
GCODE Description Price FCODE READYDATE 10023 PENCIL SKIRT 1150 F03 19-DEC-08 10001 FORMAL SHIRT 1250 F01 12-JAN-08 10012 INFORMAL SHIRT 1550 F02 06-JUN-08 10024 BABY TOP 750 F03 07-APR-07 10090 TULIP SKIRT 850 F02 31-MAR-07 10019 EVENING GOWN 850 F03 06-JUN-08 10009 INFORMAL PANT 1500 F02 20-OCT-08 10017 FORMAL PANT 1350 F01 09-MAR-08 10020 FROCK 850 F04 09-SEP-07 10089 SLACKS 750 F03 31-OCT-08 Table : FABRIC
FCODE TYPE F04 POLYSTER F02 COTTON F03 SILK F01 TERELENE (i) SELECT SUM(PRICE) FROM GARMENT WHERE FCODE = 'F01' ;
(ii) SELECT DESCRIPTION, TYPE FROM GARMENT, FABRIC
WHERE GARMENT.FCODE = FABRIC.FCODE AND GARMENT.PRICE >= 1260 ;(iii) SELECT MAX(FCODE) FROM FABRIC ;
(iv) SELECT COUNT(DISTINCT PRICE) FROM GARMENT ;
View Answer1 Likes
SQL Queries
Give output for following SQL queries as per given table(s) :
Table : PRODUCT
P_ID ProductName Manufacturer Price TPO1 Talcom Powder LAK 40 FW05 Face Wash ABC 45 BS01 Bath Soap ABC 55 SHO6 Shampoo XYZ 120 FW12 Face Wash XYZ 95 Table : CLIENT
C_ID ClientName City P_ID 01 Cosmetic Shop Delhi FW05 06 Total Health Mumbai BS01 12 Live Life Delhi SHO6 15 Pretty Woman Delhi FW12 16 Dreams Bangalore TP01 (i) SELECT DISTINCT City FROM Client ;
(ii) SELECT Manufacturer, MAX(Price), Min(Price), Count(*)
FROM Product GROUP BY Manufacturer ;(iii) SELECT ClientName, ProductName
FROM Product, Client
WHERE Client.P_Id = Product.P_Id ;(iv) SELECT ProductName, Price * 4 FROM Product ;
View Answer1 Likes
SQL Queries
Give output for following SQL queries as per given table(s) :
Table : ITEM
I_ID ItemName Manufacturer Price PC01 Personal Computer ABC 35000 LC05 Laptop ABC 55000 PC03 Personal Computer XYZ 32000 PC06 Personal Computer COMP 37000 LC03 Laptop PQR 57000 Table : CUSTOMER
C_ID CustomerName City I_ID 01 N Roy Delhi LC03 06 H Singh Mumbai PC03 12 R Pandey Delhi PC06 15 C Sharma Delhi LC03 16 K Agarwal Bangalore PC01 (i) SELECT DISTINCT City FROM Customer ;
(ii) SELECT ItemName, MAX(Price), Count(*)
FROM Item GROUP BY ItemName ;(iii) SELECT CustomerName, Manufacturer
FROM Item, Customer
WHERE Item.I_ID = Customer.I_ID ;(iv) SELECT ItemName, Price * 100
FROM Item WHERE Manufacturer = 'ABC' ;View Answer1 Likes
SQL Queries
Give output for following SQL queries as per given table(s) :
Table : SENDER
SenderID SenderName SenderAddress SenderCity ND01 R Jain 2, ABC Appts New Delhi MU02 H Sinha 12, Newtown Mumbai MU15 S Jha 27/A, Park Street Mumbai ND50 T Prasad 122-K, SDA New Delhi Table : RECIPIENT
RecID SenderID RecName RecAddress RecCity KO05 ND01 R Bajpayee 5, Central Avenue Kolkata ND08 MU02 S Mahajan 116, A Vihar New Delhi MU19 ND01 H Singh 2A, Andheri East Mumbai MU32 MU15 P K Swamy B5, C S Terminus Mumbai ND48 ND50 S Tripathi 13, B1 D, Mayur Vihar New Delhi (i) SELECT DISTINCT SenderCity FROM Sender ;
(ii) SELECT A.SenderName, B.RecName
FROM Sender A, Recipient B
WHERE A.SenderID = B.SenderID AND B.RecCity = 'Mumbai' ;(iii) SELECT RecName, RecAddress FROM Recipient
WHERE RecCity NOT IN('Mumbai', 'Kolkata') ;(iv) SELECT RecID, RecName FROM Recipient
WHERE SenderID = 'MU02' OR SenderID = 'ND50' ;View Answer2 Likes
SQL Queries
Given the table LIBRARY :
No Title Author Type Pub Qty Price 1 Data Structure Lipschutz DS McGraw 4 217 2 Computer Studies French FND Galgotia 2 75 3 Advanced Pascal Schildt PROG McGraw 4 350 4 Dbase dummies Palmer DBMS PustakM 5 130 5 Mastering C + + Gurewich PROG BPB 3 295 6 Guide Network Freed NET ZPress 3 200 7 Mastering Foxpro Seigal DBMS BPB 2 135 8 DOS guide Norton OS PHI 3 175 9 Basic for Beginners Morton PROG BPB 3 40 10 Mastering Window Cowart OS BPB 1 225 Give the output of following SQL commands on the basis of table Library.
(i) SELECT UPPER(Title) FROM Library WHERE Price < 150 ;
(ii) SELECT CONCAT(Author, Type) FROM Library WHERE Qty < 3 ;
(iii) SELECT MOD(Qty, 4) FROM Library ;
View Answer3 Likes
SQL Queries
Given the following table :
Table : STUDENT1
No. Name Stipend Stream AvgMark Grade Class 1 Karan 400.00 Medical 78.5 B 12B 2 Divakar 450.00 Commerce 89.2 A 11C 3 Divya 300.00 Commerce 68.6 C 12C 4 Arun 350.00 Humanities 73.1 B 12C 5 Sabina 500.00 Nonmedical 90.6 A 11A 6 John 400.00 Medical 75.4 B 12B 7 Robert 250.00 Humanities 64.4 C 11A 8 Rubina 450.00 Nonmedical 88.5 A 12A 9 Vikas 500.00 Nonmedical 92.0 A 12A 10 Mohan 300.00 Commerce 67.5 C 12C Give the output of following SQL statement :
(i) SELECT TRUNCATE(AvgMark) FROM Student1 WHERE AvgMark < 75 ;
(ii) SELECT ROUND(AvgMark) FROM Student1 WHERE Grade = 'B' ;
(iii) SELECT CONCAT(Name, Stream) FROM Student1 WHERE Class = '12A' ;
(iv) SELECT RIGHT(Stream, 2) FROM Student1 ;
View Answer3 Likes
SQL Queries
The Doc_name Column of a table Hospital is given below :
Doc_name Avinash Hariharan Vinayak Deepak Sanjeev Based on the information, find the output of the following queries :
(i) SELECT docname FROM HOSPITAL WHERE Docname like "%v";
(ii) SELECT docname FROM HOSPITAL WHERE docname like "%e%";
View Answer2 Likes
SQL Queries
Predict the output of the following queries based on the table CAR_SALES given below :
NUMBER SEGMENT FUEL QT1 QT2 1 Compact HatchBack Petrol 56000 70000 2 Compact HatchBack Diesel 34000 40000 3 MUV Petrol 33000 35000 4 MUV Diesel 14000 15000 5 SUV Petrol 27000 54000 6 SUV Diesel 18000 30000 7 Sedan Petrol 8000 10000 8 Sedan Diesel 1000 5000 (i) SELECT LEFT(SEGMENT, 2) FROM CAR_SALES WHERE FUEL= "PETROL";
(ii) SELECT (QT2-QT1)/2 "AVG SALE" FROM CAR_SALES WHERE SEGMENT= "SUV";
(iii) SELECT SUM(QT1) "TOT SALE" FROM CAR_SALES WHERE FUEL= "DIESEL";
View Answer5 Likes
SQL Queries
What will be the output of following code ?
mysql> SELECT CONCAT(CONCAT('Inform', 'atics'), 'Practices');
View Answer3 Likes
Showing 81 - 90 of 98 Questions