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

Q1:

2025: 30 May Shift 2

SQL Functions

Easy

Informatics Practices

Which type of value will not be considered by SQL while executing the following statement:

SELECT COUNT(column name) FROM TABLE_NAME;

Answer options
Option 4
Correct Answer
Explanation for 2025: 30 May Shift 2 CSE question 1

Q2:

2025: 30 May Shift 2

SQL Functions

Easy

Informatics Practices

Write the output produced by the following SQL command:

SELECT pow(length("Informatics Practices"),1);

Answer options
Option 3
Correct Answer
Explanation for 2025: 30 May Shift 2 CSE question 2

Q3:

2025: 30 May Shift 2

SQL Functions

Easy

Informatics Practices

Which function extracts the year value from a date?

Answer options
Option 3
Correct Answer
Explanation for 2025: 30 May Shift 2 CSE question 3

Q4:

2025: 30 May Shift 2

SQL Functions

Medium

Informatics Practices

Write the output produced by the following SQL command:

SELECT ROUND(342.9234,-1);

Answer options
Option 1
Correct Answer
Explanation for 2025: 30 May Shift 2 CSE question 4

Q5:

2025: 27 May Shift 2

SQL Functions

Easy

Informatics Practices

Which of the following are string functions?

(A) LEFT(string, n)

(B) INSTR(string, substring)

(C) MID(string, pos, n)

(D) SUBSTRING(string, pos, n)

Answer options
Option 3
Correct Answer
Explanation for 2025: 27 May Shift 2 CSE question 5

Q6:

2025: 27 May Shift 2

SQL Functions

Easy

Informatics Practices

_________ results in all pairs of rows from the two input relations, regardless of whether they have the same values on common attributes.

Answer options
Option 2
Correct Answer
Explanation for 2025: 27 May Shift 2 CSE question 6

Q8:

2025: 27 May Shift 2

SQL Functions

Medium

Informatics Practices

Match List-I with List-II

List-IList-II
(A) The function that can be used with select clause only(I) single row
(B) The function that returns the number of values in the specific column ignoring the NULL values(II) multiple row
(C) The function that returns the number of records in the table(III) count(column)
(D) The function that can be used in select, where and order by clause(IV) count(*)
Answer options
Option 1
Correct Answer
Explanation for 2025: 27 May Shift 2 CSE question 8

Q9:

2025: 27 May Shift 2

SQL Functions

Medium

Informatics Practices

______ paymentmode, COUNT(paymentmode) FROM SALETABLE _______ paymentmode _________ COUNT(*)>1 ________ paymentmode;

Arrange the words given below to be filled in the blanks in the correct order in the above query.

(A) HAVING

(B) GROUP BY

(C) SELECT

(D) ORDER BY

Answer options
Option 1
Correct Answer
Explanation for 2025: 27 May Shift 2 CSE question 9

Q10:

2025: 27 May Shift 2

SQL Functions

Easy

Informatics Practices

What will be the output of the following query?

SELECT NOW( ) ;

Answer options

Q11:

2025: 22 May Shift 1

SQL Functions

Easy

Informatics Practices

Which of the following is TRUE for union operation in SQL?

Answer options

Q13:

2025: 22 May Shift 1

SQL Functions

Easy

Informatics Practices

EmpIDEmpNameDept.SalaryLocationRating
201SmithIT75000Chicago4.5
202JaneHR60000New York4.7
203AliceFinance80000San Francisco4.8
204BobIT76000Denver4.6
205SarahMarketing68000Seattle4.9

From the above table 'EMPLOYEE', which query will retrieve employees with rating above 4.6?

Answer options

Q14:

2025: 22 May Shift 1

SQL Functions

Easy

Informatics Practices

To return the number of characters in a specified string, the correct syntax is _____.

Answer options

Q15:

2025: 22 May Shift 1

SQL Functions

Easy

Informatics Practices

Which of the following are single row functions?

(A). LTRIM( )

(B). DAYNAME( )

(C). AVG( )

(D). MOD( )

Answer options

Q16:

2025: 22 May Shift 1

SQL Functions

Easy

Informatics Practices

EmpIDEmpNameDept.SalaryLocationRating
201SmithIT75000Chicago4.5
202JaneHR60000New York4.7
203AliceFinance80000San Francisco4.8
204BobIT76000Denver4.6
205SarahMarketing68000Seattle4.9

Based on the table 'EMPLOYEES' above, what will be the correct sequence of the following statements that will provide the total number of employees in each dept?

(A) SELECT column Dept

(B) GROUP BY Dept

(C) COUNT(*) the total number of employees

(D) FROM the table EMPLOYEES

Answer options

Q17:

2025: 21 May Shift 1

SQL Functions

Easy

Informatics Practices

______ function is used to get a specified day of the month for a given date.

Answer options

Q19:

2025: 21 May Shift 1

SQL Functions

Medium

Informatics Practices

From the table 'Orders' below:

order_Idcustomer_Idorder_dateamount
11012024-03-012500
21022024-03-0112000
31012024-03-313000
41032024-04-014500
51022024-04-308000

Which query will retrieve the total amount from 'Orders' made by customer_Id = 101 in the month of March 2024.

Answer options

Q20:

2025: 21 May Shift 1

SQL Functions

Easy

Informatics Practices

Sequence the order for a SQL query:

(A) Create a Database

(B) Create the Table

(C) Write the Query

(D) Open the Database

Answer options

Q21:

2025: 21 May Shift 1

SQL Functions

Hard

Informatics Practices

From the table 'Students' and 'Graduates' below:

Students

Student_IDFirstNameLastName
1ArunSingh
2AjayVerma
3AshiKushwaha

Graduates

Graduate_IDFirstNameLastName
1DhruvManchandani
2AjayVerma
3AlokRanjan

If you want the names of the individuals who are listed in both the 'Students' and 'Graduates' tables, which SQL statement would you use?

Answer options

Q22:

2025: 21 May Shift 1

SQL Functions

Medium

Informatics Practices

Which statement correctly retrives the distinct names of all customers who have placed more than 5 orders for the 'Orders' table.

Answer options

Q23:

2025: 20 May Shift 1

SQL Functions

Easy

Informatics Practices

Match List-I with List-II

List-IList-II
(A) MONTHNAME()(I) Text function
(B) MOD()(II) Aggregate function
(C) AVG()(III) Date function
(D) LENGTH()(IV) Math function
Answer options

Q24:

2025: 20 May Shift 1

SQL Functions

Easy

Informatics Practices

Find the output of the following query:

SELECT LEFT(RIGHT(UCASE('computer science'),7),3);

Answer options

Q25:

2025: 20 May Shift 1

SQL Functions

Easy

Informatics Practices

Match List-I with List-II

List-IList-II
(A) order by(I) cardinality
(B) substr()(II) date function
(C) count(*)(III) sorting
(D) now()(IV) mid()
Answer options

Q29:

2025: 16 May Shift 1

SQL Functions

Easy

Informatics Practices

Consider the following table 'Student'.

Student

RollNoMarks
1013
2013
3013

Which of the following statements will give the same output?

(A) MAX(Marks)

(B) MIN(Marks)

(C) AVG(Marks)

(D) COUNT(Marks)

Answer options

Q30:

2025: 16 May Shift 1

SQL Functions

Easy

Informatics Practices

What is output of the following SQL statement?

SELECT LEFT((RIGHT("INFORMATION",3),2);

Answer options