Q1:

2025: 30 May Shift 2

SQL

Medium

Common

Table: 'STUDENT'

rollnumbernamecourse
1AjayScience
2AnkitaCommerce
3AnmolScience
4BhartiScience
5KaranCommerce
6MohitArts

Consider the given query:

SELECT COURSE, COUNT(*) FROM STUDENT GROUP BY COURSE HAVING COURSE="Science";

What is the use of the 'HAVING' clause in the above query?

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

Q2:

2025: 30 May Shift 2

SQL

Easy

Common

Given Table - 'Employee'

Attributes - EmployeeID, Name, Salary

Identify the correct query for performing the following operations:

Increasing the salary by 40% of all employees.

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

Q3:

2025: 30 May Shift 2

SQL

Medium

Common

Match List-I with List-II

List-IList-II
(SQL Query)(Result)
(A). SELECT DAY("2010-09-08");(I). 4
(B). SELECT MONTH("2015-09-08");(II). 8
(C). SELECT MOD(MONTH("2020-09-03"),4);(III). 9
(D). SELECT POW(DAY("2023-02-02"),2);(IV). 1
Answer options
Option 1
Correct Answer
Explanation for 2025: 30 May Shift 2 CSE question 3

Q4:

2025: 30 May Shift 2

SQL

Easy

Common

Identify the syntactically correct SQL query in order to insert a record in the table 'STUDENT' having attributes as admission_no, name, marks.

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

Q5:

2025: 30 May Shift 2

SQL

Medium

Common

Given table 'st_marks':

rollnonamemarks
1Shagun85
2Sukhi63
3Zoya86
4IrfanNULL
5Maya52

Find the output:

SELECT AVG(marks) FROM st_marks;

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

Q6:

2025: 30 May Shift 2

SQL

Medium

Common

Which concept of the relation is shown by the following query?

SELECT EMPLOYEE.EMPID, EMPLOYEE.NAME, ORDER.ORDERID, ORDER.ORDERDATE

FROM EMPLOYEE, ORDER;

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

Q7:

2025: 27 May Shift 2

SQL

Easy

Common

Which of the following commands is used to modify structure of the table?

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

Q8:

2025: 27 May Shift 2

SQL

Easy

Common

Which of the following is the correct syntax of UPDATE command?

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

Q9:

2025: 27 May Shift 2

SQL

Easy

Common

What will be the output of the following SQL command?

select LTRIM(string) ;

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

Q10:

2025: 27 May Shift 2

SQL

Medium

Common

Which of the following are valid Date Functions in SQL ?

(A) DATE( )

(B) DAY( )

(C) DAYYEAR( )

(D) DAYNAME( )

Answer options

Q11:

2025: 27 May Shift 2

SQL

Easy

Common

Which of the following SQL statement will display all the records of employee "Mahesh" having employee ID =101 in the relation 'EMPLOYEE' on the basis of 'EMPID'?

Answer options

Q12:

2025: 27 May Shift 2

SQL

Easy

Common

Which of the following aggregate function in SQL returns the total of the specified column?

Answer options

Q13:

2025: 27 May Shift 2

SQL

Easy

Common

Consider the relation 'EMPLOYEE' : [EmpNo, Ename, Salary,Bonus, DeptId]

Which among the following SQL query will display the unique department number for all the employees from the given 'EMPLOYEE' relation?

Answer options

Q14:

2025: 22 May Shift 1

SQL

Easy

Common

From the "Employee" table below:

EmpNoEnameSalary (Month)BonusDeptId
101Riya15000500D01
102Rohit21000600D02
103Richa34000800D01
104Riddhi19000700D03

Query to display name and annual income of the employees in a new column as Annual Income is:

Answer options

Q15:

2025: 22 May Shift 1

SQL

Easy

Common

The underscore( _ ) symbol is used to represent _______ matching in SQL.

Answer options

Q16:

2025: 22 May Shift 1

SQL

Easy

Common

From the following table "orders"

order_Idcustomeramount
c001Riya500
c002Rohit300
c003Ravi400

Which query will output the following result?

Total Amount

900

Answer options

Q17:

2025: 22 May Shift 1

SQL

Easy

Common

Match List-I with List-II

List-IList-II
(A). GROUP BY(I). Specific conditions on the rows with GROUP BY clause
(B). HAVING(II). It retrieves data that meet some specified conditions.
(C). ORDER BY(III). Group rows having common values
(D). WHERE(IV). Arrange rows in a particular order (ASC/DESC)
Answer options

Q18:

2025: 22 May Shift 1

SQL

Medium

Common

Match List-I with List-II

List-IList-II
(A).Count(*)(I). Returns the number of rows in a relation which has not null values in given column
(B). Count(column)(II). Returns rows present in relation one and relation two both
(C). Minus(III). Returns number of rows in a relation
(D). Intersection(IV). Returns rows present in the first relation but not in the second relation.
Answer options

Q19:

2025: 22 May Shift 1

SQL

Easy

Common

Given the following table:

Students

IDNameMarks
1.Alice85
2.Bob90
3.Charlie75

Which query will return all students having 'li' substring in their Names?

Answer options

Q20:

2025: 22 May Shift 1

SQL

Medium

Common

Given the following table:

SALE

CustIdPaymentModeEmpIdSalePriceCommission
c01Credit CardE00461200.005000.00
c02onlineE00147500.002000.00
c03ChequeE00552500.004000.00
c01Credit CardE00268000.007000.00
c04ChequeE00464500.003800.00
c02Bank FinanceE00361500.004200.00

Which query will display the number of people in each category of attribute PaymentMode from the table?

Answer options

Q21:

2025: 21 May Shift 1

SQL

Easy

Common

__________ is used to return rows that do not have any matching clause.

Answer options

Q22:

2025: 21 May Shift 1

SQL

Easy

Common

Table-ProductsSale:

IDProductPrice
101A100
102B55
103C55
104D65
105E35

Which query should be used to retrieve the total price from the table for products which have price greater than 55?

Answer options

Q23:

2025: 21 May Shift 1

SQL

Easy

Common

Consider two tables 'A' and 'B'. What does the following query do?

SELECT * FROM A

INTERSECT

SELECT * FROM B;

Answer options

Q24:

2025: 21 May Shift 1

SQL

Medium

Common

Out of the following SQL statements, which one will give the range of prices from the 'Products' table?

Answer options

Q25:

2025: 21 May Shift 1

SQL

Easy

Common

Table 1

FirstNameLastName
JohnSmith
BobDylan
AliceSomers
JacobHobbs

Table 2

FirstNameLastName
JohnSmith
BobDylan
AliceSomers

What does the Cartesian product of the two tables represent in SQL?

Answer options

Q26:

2025: 21 May Shift 1

SQL

Easy

Common

Consider the following table:

NameClassDOBGenderCityMarks
RohanXI2008MDelhi85
PriyaXII2006FMumbai92
AnkitXI2007MDelhi88
NidhiXII2006FMumbai90
AaravIX2009MKolkata78
SimranXI2007FChandigarh94
RahulXII2006MPune80
IshitaX2009FHyderabad87

From the above table 'STUDENT', which query will fetch the names of the students scoring more than 85 marks?

Answer options

Q27:

2025: 21 May Shift 1

SQL

Medium

Common

Consider the following table:

NameClassDOBGenderCityMarks
RohanXI2008MDelhi85
PriyaXII2006FMumbai92
AnkitXI2007MDelhi88
NidhiXII2006FMumbai90
AaravIX2009MKolkata78
SimranXI2007FChandigarh94
RahulXII2006MPune80

Which SQL query would generate the following output from the above table 'STUDENT'?

Name
Rohan
Priya
Ankit
Nidhi

(A) SELECT Name FROM STUDENT WHERE Class = 'XI' and Class = 'XII';

(B) SELECT Name FROM STUDENT WHERE NOT Class = 'XI' and Class = 'XII';

(C) SELECT Name FROM STUDENT WHERE City = 'Delhi' and City = 'Mumbai';

(D) SELECT Name FROM STUDENT WHERE City = 'Delhi' or City = 'Mumbai';

Answer options

Q28:

2025: 20 May Shift 1

SQL

Medium

Common

State the output:

SELECT LEFT(RIGHT("COMPUTER SCIENCE",7),3), MID(UCASE("informatics"),3,4);

Answer options

Q29:

2025: 20 May Shift 1

SQL

Easy

Common

Given table 'SALE':

caridsaledatepaymentmodesaleprice
D0012019-01-24Credit Card613248.00
D0022019-01-25Cheque604000.00
E0012019-01-30Credit Card620214.00

Find the output for:

SELECT COUNT(DISTINCT PAYMENTMODE) FROM SALE;

Answer options

Q30:

2025: 20 May Shift 1

SQL

Easy

Common

Rohan created a table 'Product' with structure: PID, Pname, Pdescp, Pqty, Pprice

He added 10 records in the table. Now he wants to change the size of column 'Pname' from 20 to 25.

Identify the correct SQL query to do this.

Answer options