CBSE-CLASS-XII SERIES
Informatics-practice

Sql Queries

14 previous year questions.

Volume: 14 Ques
Yield: Medium

High-Yield Trend

14
2025

Chapter Questions
14 MCQs

01
PYQ 2025
medium
informatics-practice ID: cbse-cla

Consider the following tables:

Write SQL queries for the following:
(i) To delete those records from table SALES whose UnitsSold is less than 80.
(ii) To display names of all products whose category is not known.
(iii) To display the product names along with their corresponding units sold.

02
PYQ 2025
medium
informatics-practice ID: cbse-cla

Given the following tables:

Write SQL queries for the following:
(i) To display the number of students from each city.
(ii) To find the average age of all students.
(iii) To list the names of students and their grades.

03
PYQ 2025
medium
informatics-practice ID: cbse-cla

(i) Write the SQL statement to create a table, Customer with the following specifications:

(ii) Write the SQL query to display all records in descending order of LName from the Table Customer.

04
PYQ 2025
medium
informatics-practice ID: cbse-cla

With respect to SQL, match the function given in column-II with categories given in column-I :

1
(i)-(c), (ii)-(d), (iii)-(a), (iv)-(b)
2
(i)-(b), (ii)-(a), (iii)-(d), (iv)-(c)
3
(i)-(d), (ii)-(b), (iii)-(a), (iv)-(c)
4
(i)-(b), (ii)-(c), (iii)-(d), (iv)-(a)
05
PYQ 2025
medium
informatics-practice ID: cbse-cla
Write SQL queries for the following:
(i) To calculate the square of 15.
(ii) To round the number 456.789 to the nearest integer.
(iii) To display the position of first occurrence of 'com' in the string 'mycommercial.com'.
(iv) To display the name of the day for the date '2024-11-07'.
(v) To display the current date and time.
06
PYQ 2025
medium
informatics-practice ID: cbse-cla
Write SQL query for the following:
(i) To display sum total of all the values of the Score column, from STUDENTS table.
(ii) To display the first five characters of the Name column from STUDENTS table.
(iii) To display the values of Name column from the STUDENTS table, after removing the trailing spaces.
(iv) To retrieve the lowest score from the Score column of GRADES table.
(v) To increase the fee of all students by 100, in the STUDENTS table. (The name of the column is FEE)
07
PYQ 2025
medium
informatics-practice ID: cbse-cla
Consider the string "Informatics Practices". Write suitable SQL queries for the following :
(i) To convert the entire string to uppercase.
(ii) To display the total number of characters in the given string.

08
PYQ 2025
medium
informatics-practice ID: cbse-cla
Assertion (A) : The ROUND() function in SQL can be used to round off a number to a specified number of decimal places.
Reason (R) : The ROUND() function is a string function that accepts character values as input and returns numerical values as output.
1
Both Assertion (A) and Reason (R) are True and Reason (R) is the correct explanation for Assertion (A).
2
Both Assertion (A) and Reason (R) are True and Reason (R) is not the correct explanation for Assertion (A).
3
Assertion (A) is True and Reason (R) is False.
4
Assertion (A) is False, but Reason (R) is True.
09
PYQ 2025
medium
informatics-practice ID: cbse-cla
Which SQL function calculates ?
1
MOD()
2
POWER()
3
RAISE()
4
ROUND()
10
PYQ 2025
medium
informatics-practice ID: cbse-cla
State whether the following statement is True or False :
The MOD()
function in SQL returns the quotient of division operation between two numbers.
11
PYQ 2025
medium
informatics-practice ID: cbse-cla
Which of the following is not an aggregate function in SQL ?
1
COUNT(*)
2
MIN()
3
LEFT()
4
AVG()
12
PYQ 2025
medium
informatics-practice ID: cbse-cla
What will be the output of the following SQL command?
SELECT MONTHNAME('2024-08-02');

1
08
2
02
3
February
4
August
13
PYQ 2025
medium
informatics-practice ID: cbse-cla

Ashutosh, who is a manager, has created a database to manage employee records. The database includes a table named EMPLOYEE whose attribute names are mentioned below:
EID : Stores the unique ID for each employee.
EMP_NAME : Stores the name of the employee.
DEPT : Stores the department of the employee.
SALARY : Stores the salary of the employee.
JOIN_DATE : Stores the employeeโ€™s joining date.

Write the output of the following SQL Queries:
(i) SELECT SUBSTRING(EMP_NAME, 1, 5) FROM EMPLOYEE WHERE DEPT = 'ENGINEERING';
(ii) SELECT EMP_NAME FROM EMPLOYEE WHERE MONTH(JOIN_DATE) = 8;
(iii) SELECT EMP_NAME FROM EMPLOYEE WHERE SALARY>60000;
(iv) SELECT COUNT(DEPT) FROM EMPLOYEE;

14
PYQ 2025
medium
informatics-practice ID: cbse-cla

An educational institution is maintaining a database for storing the details of courses being offered. The database includes a table COURSE with the following attributes:
C_ID : Stores the unique ID for each course.
C_NAME : Stores the courseโ€™s name.
INSTRUCTOR : Stores the name of the course instructor.
DURATION : Stores the duration of the course in hours.

Write SQL queries for the following:
(i) To add a new record with following specifications:
C_ID : C106
C_NAME : Introduction to AI
INSTRUCTOR : Ms. Preeti
DURATION : 55
(ii) To display the longest duration among all courses.
(iii) To count total number of courses run by the institution.
(iv) To display the instructorsโ€™ name in lower case.