• Home
  • Textbooks
  • CUET (UG) Question Bank Chapter-wise and Topic-wise General Test | For 2024 Exam
  • DATABASE QUERY USING SQL

CUET (UG) Question Bank Chapter-wise and Topic-wise General Test | For 2024 Exam

Oswaal Editorial Board

Chapter 1

DATABASE QUERY USING SQL - all with Video Answers

Educators


Section 1

[A] MULTIPLE CHOICE QUESTIONS

01:40

Problem 1

Consider the table given below:
TABLE: STUDENT
$$
\begin{array}{|l|l|l|}
\hline \text { ADM } & \text { NAME } & \text { CLASS } \\
\hline 1 & \text { Anshuman } & \text { 12A } \\
\hline 2 & \text { Arun Lal } & \text { 12C } \\
\hline 3 & \text { Sachin } & \text { 12A } \\
\hline 4 & \text { Kapil } & \text { 12B } \\
\hline 5 & \text { Sunil } & 12 \mathrm{~A} \\
\hline 6 & \text { Virat } & 12 \mathrm{C} \\
\hline
\end{array}
$$
Based on the above table, which command will give the following result:
$$
\begin{array}{|l|l|}
\hline \text { CLASS } & \text { No. of students } \\
\hline \text { 12A } & 3 \\
\hline 12 \mathrm{C} & 2 \\
\hline
\end{array}
$$
(A) Select CLASS, Count (*) From STUDENT Group by CLASS;
(B) Select CLASS, Count(*) 'No of students'
From STUDENT
GROUP by CLASS;
(C) SELECT CLASS, COUNT (No of students)
FROM STUDENT
Group By CLASS
Having count (*)>1;
(D) SELECT CLASS, COUNT (*) 'No of students'
EROM STUDENT
Group By CLASS
Having count (*) $>1$;

James Kiss
James Kiss
Numerade Educator
01:40

Problem 2

Consider the table given below:
Table: STUDENT
$$
\begin{array}{|l|l|l|l|}
\hline \text { ADMNO } & \text { NAME } & \text { CLASS } & \text { SCORE } \\
\hline \text { A001 } & \text { Amit } & \text { 12A } & 90 \\
\hline \text { A002 } & \text { Amit } & \text { 12B } & 91 \\
\hline \text { A003 } & \text { Bhavana } & \text { 12A } & 90 \\
\hline \text { A004 } & \text { Yamini } & \text { 12A } & 89 \\
\hline \text { A005 } & \text { Ashok } & \text { 12B } & 95 \\
\hline
\end{array}
$$
Which of the following command will display all the records according to their names in descending order and their scores in descending order?
(A) SELECT * FROM STUDENT ORDER BY NAME, SCORE DESC;
(B) SELECT * FROM STUDENT ORDER BY NAME AND SCORE DESC;
(C) SELECT * FROM STUDENT ORDER BY NAME DESC, SCORE DESC;
(D) SELECT * FROM STUDENT ORDER BY NAME DESC AND SCORE DESC;

James Kiss
James Kiss
Numerade Educator

Problem 3

Find output for the following:
[CUET 2022]
Select substr("Every cloud has a Silver lining", 7.5);
(A) cloud
(B) cloud has a silver lining
(C) Every c
(D) very

Check back soon!
00:53

Problem 4

Give the output for the following query:
Select Monthname ( “2003-11-10");
[CUET 2022]
(A) October
(B) November
(C) 10
(D) 11

Amy Jiang
Amy Jiang
Numerade Educator

Problem 5

Assume the given tables Dance and Music.
Music
$$
\begin{array}{|l|l|l|}
\hline \text { S.No. } & \text { Name } & \text { Class } \\
\hline 1 & \text { Mehek } & 8 \mathrm{~A} \\
\hline 2 & \text { Mahira } & 6 \mathrm{~A} \\
\hline 3 & \text { Lavanya } & 7 \mathrm{~A} \\
\hline 4 & \text { Sanjay } & 7 \mathrm{~A} \\
\hline 5 & \text { Abhay } & 8 \mathrm{~A} \\
\hline
\end{array}
$$
Dance
$$
\begin{array}{|l|l|l|}
\hline \text { S.No } & \text { Name } & \text { Class } \\
\hline 1 & \text { Aastha } & \text { 7B } \\
\hline 2 & \text { Mahira } & \text { 6A } \\
\hline 3 & \text { Mohit } & \text { 7B } \\
\hline 4 & \text { Sanjay } & \text { 7A } \\
\hline
\end{array}
$$
Which operation should be applied to the table to get the following output?
(A) $\mathrm{U}$
(B) $\cap$
(C) -
(D) $\mathrm{X}$

Check back soon!
01:49

Problem 6

Write the output of the following SQL command. select round(49.88);
(A) 49.88
(B) 9.8
(C) 49.0
(D) 50

Prem Bijarniya
Prem Bijarniya
Numerade Educator
01:39

Problem 7

Which of the following aggregation operation adds up all the values of the attribute?
(A) add
(B) avg
(C) $\max$
(D) sum

Manik Pulyani
Manik Pulyani
Numerade Educator

Problem 8

What is returned by INSTR ('JAVAT POINT', 'P')?
(A) 6
(B) 7
(C) POINT
(D) JAVAT

Check back soon!

Problem 9

What is the meaning of "GROUP BY" clause in Mysql?
(A) Group data by column values
(B) Group data by row values
(C) Group data by column and row values
(D) None of these

Check back soon!

Problem 10

"COUNT" keyword belongs to which categories in Mysql?
(A) Aggregate functions
(B) Operators
(C) Clauses
(D) All of the mentioned

Check back soon!

Problem 11

The avg() function in MySql is an example of $\qquad$
(A) Math function
(B) Text function
(C) Date function
(D) Aggregate function

Check back soon!

Problem 12

Write the output of the following SQL command. select substr("COMPUTER",3,4);
(A) MPUT
(B) PUTE
(C) PU
(D) MP

Check back soon!

Problem 13

To specify condition with a GROUP BY clause, $\qquad$ clause is used.
(A) USE
(B) WHERE
(C) HAVING
(D) LIKE

Check back soon!

Problem 14

Which clause is similar to "HAVING" clause in Mysql?
(A) SELECT
(B) WHERE
(C) FROM
(D) None of the above

Check back soon!

Problem 15

What values does the count( $\left.{ }^{(}\right)$function ignore?
(A) Repetitive values
(B) Null values
(C) Characters
(D) Integers

Check back soon!
00:32

Problem 16

The string function that returns the index of the first occurrence of substring is $\qquad$
(A) INSERT()
(B) INSTR()
(C) INSTRING()
(D) INFSTR()

Aditya Sood
Aditya Sood
Numerade Educator

Problem 17

Only $\qquad$ functions are used with GROUP BY clause.
(A) Text
(B) Math
(C) Date/Time
(D) AGGREGATE

Check back soon!

Problem 18

The month() function in MySql is an example of $\qquad$
(A) Math function
(B) Text function
(C) Date Function
(D) Aggregate Function

Check back soon!
01:50

Problem 19

If column "Fees" contains the data set $(5000,8000,7500$, 5000,8000 ), what will be the output after the execution of the given query?
[CUET 2023]
SELECT SUM (DISTINCT Fees) FROM student;
(A) 20500
(B) 10000
(C) 20000
(D) 33500

Vysakh M
Vysakh M
Numerade Educator
01:13

Problem 20

Write the output of the following SQL query: SELECT POW (INSTR('Wonders','n'),3); [CUET 2023]
(A) 12
(B) 9
(C) 16
(D) 25

Samriddhi Singh
Samriddhi Singh
Numerade Educator