Q1:

2026: 19 May Shift 1

SQL

Easy

Common

Arrange the following in order to create 'STUDENT' table in the "Attendance" database:

(A) mysql> USE Attendance;

(B) mysql> DESCRIBE STUDENT;

(C) mysql> CREATE DATABASE Attendance;

(D) mysql> CREATE TABLE STUDENT(RollNumber INT, SName VARCHAR(20), SDateofBirth DATE, GUID CHAR (12), PRIMARY KEY (RollNumber));

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

Q2:

2026: 19 May Shift 1

SQL

Easy

Common

Which of the following SQL Command is used to modify the table structure?

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

Q4:

2026: 19 May Shift 1

SQL

Medium

Common

Which of the following statements is TRUE with respect to SQL:

(A) AVG(COLUMN): returns the average of the non-null values in the column

(B) COUNT(COLUMN): returns the number of null values in the column

(C) MAX(COLUMN): returns the highest of the non-null values in the column

(D) SUM(COLUMN): returns the sum of the non-null values in the column

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

Q5:

2026: 19 May Shift 1

SQL

Easy

Common

Consider a table named 'SALE':

InvoiceNoCarIdCustIDDate_salepaymentEmpId
I001D001C0012017-01-24ChequeE002
I002S001C0022017-12-11CashE003
I003S002C0032018-09-15CashE005
I004D002C0012018-12-24ChequeE004
I005S003C0022020-07-15CashE002

What will be the SQL query to find the number of different customer IDs?

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

Q6:

2026: 18 May Shift 2

SQL

Easy

Common

Fill in the blanks for the following SQL query to retrieve the total number of orders placed by each customer:

SELECT Customer_ID, ______(OrderID) AS TotalOrders FROM Orders GROUP BY _______.

Answer options
Option 3
Correct Answer
Explanation for 2026: 18 May Shift 2 CSE question 6

Q8:

2026: 18 May Shift 2

SQL

Easy

Common

___________ is an operation which is used to combine rows from two or more tables based on one or more common fields between them.

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

Q9:

2026: 18 May Shift 2

SQL

Medium

Common

Consider the 'Employee' table given below:

Emp_ IdNameDeptSalary
101AsthaHR80000
102SumitIT50000
103NidhiMarketing40000
104AnandIT55000
105JyotiHR70000

Which of the following SQL query will find the name of the employee with the highest salary?

Answer options
Option 4
Correct Answer
Explanation for 2026: 18 May Shift 2 CSE question 9

Q10:

2026: 18 May Shift 2

SQL

Easy

Common

If table 'A' has 4 rows and table 'B' has 5 rows, then how many rows will be there in the Cartesian product of both these tables?

Answer options

Q11:

2026: 13 May Shift 2

SQL

Easy

Common

Match List-I with List-II

List-I SQL COMMANDSList-II Applications
(A) DESCRIBE(I) To add/remove an attribute or to modify the datatype of an existing attribute or to add constraints to the attribute
(B) ALTER(II) To remove a database or a table permanently from the system
(C) DROP(III) To create a database
(D) CREATE(IV) To view the structure of an already created table
Answer options

Q13:

2026: 13 May Shift 2

SQL

Easy

Common

What will be the output of the following command for the relation Motor?

SELECT COUNT(*) from MOTOR;

MOTOR

caridcarnamepricemodelyear
D001Dzire528658LXI2017
D002Dzire673182VXI2019
B001Baleno567892Sigma1.22019
B002Baleno355252Delta1.22019
E001EECO352525CARE2018
S0001SWIFT514025LXI2015
Answer options

Q14:

2026: 13 May Shift 2

SQL

Medium

Common

Arrange the following SQL Command in correct order of writing the query:

(A) SELECT PaymentMode, Count(PaymentMode)

(B) GROUP BY Paymentmode HAVING COUNT(*)>1

(C) ORDER BY Paymentmode;

(D) FROM SALE

Answer options

Q15:

2026: 13 May Shift 2

SQL

Medium

Common

What are the common SQL Constraints?

(A) SUPER KEY

(B) CANDIDATE KEY

(C) UNIQUE

(D) DEFAULT

Answer options

Q16:

2026: 13 May Shift 2

SQL

Medium

Common

Which of the following SQL functions are used to perform operations on date?

(A) DATE()

(B) MONTH()

(C) NOW()

(D) CURRTIME()

Answer options

Q18:

2026: 11 May Shift 2

SQL

Easy

Common

What is the meaning of clause LIKE '7%7' in the context of SQL?

Answer options

Q19:

2026: 11 May Shift 2

SQL

Easy

Common

What is the output of the following SQL query?

select DAY ("2003-10-03");

Answer options

Q20:

2026: 11 May Shift 2

SQL

Medium

Common

A UNION query on relations:

Answer options

Q21:

2026: 11 May Shift 2

SQL

Medium

Common

Consider an employee table having two columns namely 'LastName' and 'FirstName'. Identify the Correct INSERT queries from the following:

A. INSERT INTO employee ("aaa","bbb");

B. INSERT INTO employee VALUE ("aaa","bbb");

C. INSERT INTO employee VALUES ("aaa","bbb");

D. INSERT INTO employee (LastName, FirstName) VALUES ("aaa","bbb");

Answer options

Q22:

2025: 3 June Shift 2

SQL

Easy

Common

__________group the rows together that contains the same value in a specified column.

Answer options

Q23:

2025: 3 June Shift 2

SQL

Medium

Common

Which of the following statements are correct?

(A) Aggregate functions are also known as group functions.

(B) The aggregate function returns one result for a group of rows.

(C) Aggregate function can be used in SELECT clause.

(D) Aggregate function can be used in ORDER BY clause.

Answer options

Q24:

2025: 3 June Shift 2

SQL

Medium

Common

What will the following SQL query retrieve?

SELECT count(age) FROM student;

Answer options

Q25:

2025: 3 June Shift 2

SQL

Easy

Common

What will the following SQL query return?

SELECT DISTINCT DeptId from EMPLOYEE;

Answer options

Q26:

2025: 3 June Shift 2

SQL

Medium

Common

What will be the output of the following SQL query?

SELECT LENGTH(" DELHI"), LENGTH(LTRIM(" DELHI"));

Answer options

Q27:

2025: 3 June Shift 2

SQL

Easy

Common

What output the following SQL query will generate?

SELECT DATE(NOW());

Answer options

Q28:

2025: 3 June Shift 2

SQL

Easy

Common

Updating an existing row in a database is __________.

Answer options

Q30:

2025: 30 May Shift 2

SQL

Easy

Common

Identify the correct statement in order to delete all the rows of a table 'EMPLOYEE' without deleting the structure:

Answer options