CUET Computer/IP: Informatics PracticesSQL Functions. Free, no login required.

Q1:

2026: 31 May Shift 1

SQL Functions

Easy

Informatics Practices

Which of the following query will correctly retrieve the names in uppercase of all those who joined in year 2022 , from emp table ?

Note: Consider 'name' as the column containing names of the employees and 'doj' is the field containing date of joining of employees.

Answer options
Option 1
Correct Answer
Explanation for 2026: 31 May Shift 1 CSE question 1

Q2:

2026: 31 May Shift 1

SQL Functions

Easy

Informatics Practices

Which of the following is the correct query to retrieve the last three characters from the 'City' column of the 'Customer' table?

A. SELECT LEFT(City, 3) FROM Customer;

B. SELECT RIGHT(City, 3) FROM Customer;

C. SELECT MID(City, 3) FROM Customer;

D. SELECT LENGTH(City, 3) FROM Customer;

Answer options
Option 2
Correct Answer
Explanation for 2026: 31 May Shift 1 CSE question 2

Q3:

2026: 31 May Shift 1

SQL Functions

Easy

Informatics Practices

What will be the output of the following query?

SELECT MID("NCERT DELHI", 2, 4);

Answer options
Option 1
Correct Answer
Explanation for 2026: 31 May Shift 1 CSE question 3

Q4:

2026: 31 May Shift 1

SQL Functions

Easy

Informatics Practices

Arrange the following query snippets in correct order to find the length of FirstName where it starts with 'A'. The result should be sorted as per the order of length of FirstName.

A. WHERE LEFT(FirstName,1)='A'

B. SELECT FirstName, LENGTH(FirstName)

C. ORDER BY LENGTH(FirstName)

D. FROM Employee

Answer options
Option 4
Correct Answer
Explanation for 2026: 31 May Shift 1 CSE question 4

Q5:

2026: 29 May Shift 2

SQL Functions

Easy

Informatics Practices

There is an extension of ___________ operation called ________ which works in the same manner, but removes the redundant attribute.

Answer options
Option 1
Correct Answer
Explanation for 2026: 29 May Shift 2 CSE question 5

Q6:

2026: 29 May Shift 2

SQL Functions

Medium

Informatics Practices

Match the LIST-I with LIST-II

LIST-ILIST-II
A.SELECT MID("Informatics", 3)I.form
B.SELECT MID("Informatics", 3, 4)II.formatics
C.SELECT LEFT("Informatics", 4)III.ics
D.SELECT RIGHT("Informatics", 3)IV.Info
Answer options
Option 4
Correct Answer
Explanation for 2026: 29 May Shift 2 CSE question 6

Q7:

2026: 29 May Shift 2

SQL Functions

Easy

Informatics Practices

Which of the following are valid functions to returns a substring of size 'n' starting from the specified position (pos) of the string?

A. INSTR(string, pos)

B. MID(string, pos, n)

C. SUBSTRING(string, pos, n)

D. SUBSTR(string, pos, n)

Answer options
Option 4
Correct Answer
Explanation for 2026: 29 May Shift 2 CSE question 7

Q8:

2026: 29 May Shift 2

SQL Functions

Easy

Informatics Practices

What is the correct occurrence of following keywords while writing a group by query?

A. GROUP BY

B. HAVING

C. SELECT

D. FROM

Answer options
Option 3
Correct Answer
Explanation for 2026: 29 May Shift 2 CSE question 8

Q9:

2026: 29 May Shift 1

SQL Functions

Easy

Informatics Practices

Place the following clauses in correct order to write a query in SQL.

(A) SELECT FROM

(B) HAVING

(C) ORDER BY

(D) GROUP BY

Answer options
Option 1
Correct Answer
Explanation for 2026: 29 May Shift 1 CSE question 9

Q10:

2026: 29 May Shift 1

SQL Functions

Easy

Informatics Practices

Which of the following are 'String Functions'?

(A) LENGTH

(B) INSTR

(C) MID

(D) COUNT

Answer options

Q11:

2026: 29 May Shift 1

SQL Functions

Medium

Informatics Practices

State the output of the following query:

SELECT MID('PYTON PROGRAMS',4,5);

Answer options

Q12:

2026: 29 May Shift 1

SQL Functions

Medium

Informatics Practices

State the output of the following query:

SELECT LEFT(RTRIM('$$PYTHON$$'),4);

WHERE '$' REPRESENTS BLANK SPACE.

Answer options

Q13:

2026: 26 May Shift 1

SQL Functions

Easy

Informatics Practices

Which of the following statement correctly update increase in the Salary by 10% in the table 'EMP'?

Answer options

Q14:

2026: 26 May Shift 1

SQL Functions

Medium

Informatics Practices

Consider two tables 'EMP' and 'PARKING':

EMP(S.No, Name, Dept);

PARKING(S.No, Name, Dept);

Which of the following query will display only those rows such that the attribute "name" in both the tables have the same value?

Answer options

Q15:

2026: 26 May Shift 1

SQL Functions

Medium

Informatics Practices

An operation that combines tuples from two relations including all rows regardless of whether or not they have the same values on common attributes is ________

Answer options

Q17:

2026: 24 May Shift 1

SQL Functions

Easy

Informatics Practices

What is the degree of the resulting table when performing a Cartesian product of two tables with degrees 3 and 4?

Answer options

Q18:

2026: 24 May Shift 1

SQL Functions

Easy

Informatics Practices

Match List-I with List-II

List-IList-II
AGGREGATE FUNCTIONSDESCRIPTION
(A) COUNT()(I) Returns the average of the values in a specified column
(B) AVG()(II) Returns the number of records in a table
(C) COUNT(*)(III) Truncate numerical values to a specified position
(D) ROUND()(IV) Returns the number of values in a specified column, ignoring NULL values
Answer options

Q19:

2026: 24 May Shift 1

SQL Functions

Easy

Informatics Practices

Which clause is used to combine rows from two tables that meet a condition?

Answer options

Q20:

2026: 24 May Shift 1

SQL Functions

Easy

Informatics Practices

Which of the following operations can be performed with the UNION clause in SQL?

Answer options

Q21:

2026: 23 May Shift 2

SQL Functions

Easy

Informatics Practices

Match the LIST-I with LIST-II

LIST-ILIST-II
A.JOINI.Results in all pairs of rows from the two input relations
B.UNIONII.JOIN without redundant columns
C.NATURAL JOINIII.Combine tuples from two tables on specified conditions
D.CARTESIANIV.Combine the selected rows
Answer options

Q22:

2026: 23 May Shift 2

SQL Functions

Easy

Informatics Practices

Which of the following query from 'INVENTORY' relation will work for calculating 18% GST rounded to one decimal place for the 'Price' column?

Answer options

Q23:

2026: 23 May Shift 2

SQL Functions

Easy

Informatics Practices

The HAVING clause is used to ________.

Answer options

Q24:

2026: 23 May Shift 2

SQL Functions

Easy

Informatics Practices

Which query displays 'CustName' and 'Email' from the 'CUSTOMER' table, sorted alphabetically by 'CustName'?

Answer options

Q25:

2026: 23 May Shift 1

SQL Functions

Medium

Informatics Practices

Which SQL query correctly filters out groups with a total sales amount greater than 10,000?

Answer options

Q26:

2026: 23 May Shift 1

SQL Functions

Easy

Informatics Practices

Which of the following operation combines tuples from two relations resulting in all pairs of rows from the two input relations, regardless of whether or not they have the same values on common attributes?

Answer options

Q27:

2026: 23 May Shift 1

SQL Functions

Easy

Informatics Practices

Which of the following are single row functions?

A. MAX()

B. SUM()

C. MOD()

D. DAY()

Answer options

Q28:

2026: 23 May Shift 1

SQL Functions

Easy

Informatics Practices

Match the LIST-I with LIST-II

LIST-I (SQL Clause)LIST-II (Description)
A.GROUP BYI.Is used to fetch some rows on the basis of common values in a column.
B.HAVINGII.Is used to specify conditions on rows with Group By clause.
C.ORDER BYIII.Is used to display data in an ordered form.
D.WHEREIV.Is used to retrieve data that meets certain conditions.
Answer options

Q29:

2026: 21 May Shift 1

SQL Functions

Easy

Informatics Practices

Aggregate functions are also known as ________.

Answer options

Q30:

2026: 21 May Shift 1

SQL Functions

Easy

Informatics Practices

What will be the output of the following query?

SELECT NOW();

Answer options