0% found this document useful (0 votes)
6 views4 pages

Grade XII Computer Science Exam Paper

This document is a question paper for Grade XII Computer Science with a maximum score of 20 marks and a time limit of 40 minutes. It contains 13 compulsory questions divided into four sections, focusing on SQL and Python programming. The paper includes multiple-choice questions, SQL query writing tasks, and data manipulation exercises based on provided tables.

Uploaded by

akkashabi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

Grade XII Computer Science Exam Paper

This document is a question paper for Grade XII Computer Science with a maximum score of 20 marks and a time limit of 40 minutes. It contains 13 compulsory questions divided into four sections, focusing on SQL and Python programming. The paper includes multiple-choice questions, SQL query writing tasks, and data manipulation exercises based on provided tables.

Uploaded by

akkashabi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

AGR GLOBAL SCHOOL Max.

Marks :20/ Time :40 MIN


UNIT -II
Name :
GRADE – XII
SUBJECT – COMPUTER SCIENCE Date : 28.10.25

General Instructions:
 This question paper contains 13 questions.
 All questions are compulsory.
 The paper is divided into 4 Sections- A, B, C and D
 Section A consists of 10questions (1 to 10). Each question carries 1 Mark.
 Section B consists of 1 question (11) carries 2 Marks.
 Section C consists of 1 question (12) carries 3 Marks.
 Section D consists of 1 question (13) carries 5 Marks
 All programming questions are to be answered using Python Language only.
 In case of MCQ, text of the correct answer should also be written

SECTION A

CHOOSE THE BEST ANSWER. 1 X 10=10

1. Which aggregate function in SQL displays the number of values in the specified column
ignoring the NULL values?
(A) len() (B) count() (C) number () (D) num ()
2. Which of the following is a DML command in SQL?
(A) UPDATE (B) CREATE (C) ALTER (D) DROP
3. Raj is a database programmer, He has to write the query from EMPLOYEE table
to search for the employee who are not getting any commission, for this he has
written the query as:
SELECT * FROM EMPLOYEE WHERE commission =null;
But the query is not producing the correct output, help Raj and correct the query so
that he gets the desired output.
4. _________ is an attribute, whose values are Unique and not null.
(A) Primary Key (B)Foreign Key (C)Candidate Key (D)Alternate Key
5. The default date format in MySQL is:
(A) DD/MM/YYYY (B) YYYY/MM/DD
(C) MM-DD-YYYY (D) YYYY-MM-DD
6. Which is a valid CREATE TABLE statement?
(A) Create table emp add(id integer(3)); (B) Create table emp(id integers(3));
(C) Create table emp modified(id integer(3)); D) Create table emp(id integer(3));
7. Which command is used to retrieve data from the database?
(A) SELECT (B) INSERT (C) UPDATE (D) DELETE
8 . Which command is used to add a new record in a table?
(A) INSERT INTO (B) ADD RECORD (C)UPDATE (D) CREATE
9. Which command modifies existing records?
(A) UPDATE (B) ALTER (C) MODIFY (D) INSERT
10. Which of the following constraints prevents duplicate values?
(A) UNIQUE (B) NOT NULL (C) PRIMARY KEY (D) FOREIGN KEY

SECTION B 1 X 2=2

11. Mr. Pranaya has just created a table named “DEPARTMENT” containing columns
Deptno, Dname, Location, and Phone. After creating the table , he realized that he
needed to remove the Phone column from the table. Help him to write a SQL
command to remove the column Phone from “DEPARTMENT” table.
Thereafter write the command to modify the location of Deptno-101 as “Odisha” in
the table.

SECTION C 1 X 3=3

12. Consider the table TRANSACTION given below.

TABLE: TRANSACTION

TRNO ANO AMOUNT TYPE DOT


T001 101 2500 Withdraw 2017-12-21
T002 103 3000 Deposit 2017-06-01
T003 102 2000 Withdraw 2017-05-12
T004 103 1000 Deposit 2017-10-22
T005 101 12000 Deposit 2017-11-06

Based on the given table, write SQL queries for the following.
a) Change the amount as 1500 of all those transactions where amount is less than or equal to
2000.
b) Display all details of transactions which happened before 01-12-2007.
c) Display sum of amount of those having ANO as 103.
SECTION D 10 X 1/2=5

13. CONSIDER THE TABLE GIVEN BELOW

TABLE:EMPLOYEE

ECODE NAME DESIG SGRADE DOJ DOB


101 Vikrant Executive S03 2003-03-23 1980-01-13
102 Ravi Head-IT S02 2010-02-12 1987-07-22
103 John Cena Receptionist S03 2009-06-24 1983-02-24
105 Azhar Ansari GM S02 2009-08-11 1984-03-03
108 Priyam Sen CEO S01 2004-12-29 1982-01-19

TABLE: SALGRADE
SGRADE SALARY HRA
S01 56000 18000
S02 32000 12000
S03 24000 8000

(i) To display details of all employee in descending order of their DOJ


(ii) To display NAME and DESIG of those employees whose sgrade is either ‘S02’ or
‘S03’.
(iii) To display NAME, DESIG,SGRADE of those employee who joined in the year 2009.
(iv) To display all SGRADE,ANNUAL_SALARY from table SALGRADE [where
ANNUAL_SALARY=SALARY*12]
(v) To display number of employee working in each SALGRADE from table
EMPLOYEE.
(vi) To display NAME, DESIG , SALARY,HRA from tables EMPLOYEE and
SALGRADE where SALARY is less than 50000.
(vii) Select MIN(DOJ), MAX(DOB) from employee.
(viii) Select count(distinct sgrade) from employee.
(ix) Select SGrade, Salary+HRA from SalGrade where SGrade=’S02’
(x) Select sum(salary),, avg(salary) from salgrade.

*******

You might also like