STUDENT

DATABASE QUERY USING SQL
Total Q: 66
Time: 60 Mins

Q 1.

State whether the following statement is True or False:
The MOD() function in SQL returns the quotient of division operation between two numbers.

Q 2.

The SQL command that will display the current time and date is :

Q 3.

Which one of the following functions is used to find the largest value from the given data in MySQL?

Q 4.

Which of the following function returns a string type value?

Q 5.

Which one of the following is not an aggregate function?

Q 6.

Find the output of the following SQL queries :
Select INSTR("Data Science","ie");

Q 7.

What is DBMS?

Q 8.

The purpose of WHERE clause in a SQL statement is to:

Q 9.

To remove the leading spaces from data values in a column of MySQL table, we use

Q 10.

Which of the following is a category of DQL (Data Query Language)?

Q 11.

Which type of values will not be considered by SQL while executing the following statement?
SELECT COUNT(column name) FROM inventory;

Q 12.

Write the output of the following SQL command.
select round(49.88);

Q 13.

What will be the output of the following query ?
SELECT SUBSTR("Swachh Survekshan",2,4)

Q 14.

Write the output of the following SQL command :
select pow(2,2*2);

Q 15.

Which of the following clause cannot work with SELECT statement in MYSQL?

Q 16.

Which of the following is a category of DDL (Data Definition Language)?

Q 17.

The ____________command can be used to makes changes in the rows of a table in SQL.

Q 18.

State whether the following statement is True or False:
The 'BETWEEN' operator in SQL is inclusive, meaning it includes the starting and ending values in the range.

Q 19.

Raj, a Database Administrator, needs to display the average pay of workers from those departments which have more than five employees. He is experiencing a problem while running the following query:

SELECT DEPT, AVG(SAL) FROM EMP WHERE COUNT(*) > 5 GROUP BY DEPT;

Which of the following is a correct query to perform the given task?

Q 20.

What will be the output of the following SQL command?
SELECT MONTHNAME('2024-08-02');

Q 21.

What will be the output of the following query ?
SELECT MOD (5, 15);

Q 22.

Which of the following is not an aggregate function in MYSQL ?

Q 23.

Which of the following function in SQL returns an integer type value?

Q 24.

Which SQL function calculates ab?

Q 25.

Expand the term DBMS.

Q 26.

The avg() function in MySql is an example of _________ .

Q 27.

With respect to databases, a row in a relation is also known as a/an __________.

Q 28.

_____ helps to fetch a group of rows based on common values in a column.

Q 29.

Fill in the Blank
The COUNT(*) function provides the total number of __________ within a relation (table) in a relational database.

Q 30.

An aggregate function performs a calculation on _________ and returns a single value.

Q 31.

Which one of the following would arrange the rows in ascending order in SQL ?

Q 32.

Which of the following is a DBMS?

Q 33.

Which of the following is a DBMS?

Q 34.

Assertion (A): In a table in SQL Domain defines the rules on the column.
Reason (R): In SQL, Candidate Key are columns which can become Primary Key.

Q 35.

Which of the following is a DBMS?

Q 36.

With reference to SQL, identify the invalid data type.

Q 37.

Write the output of the following SQL query :
SELECT LCASE(SUBSTR("Project Management",9,6));

Q 38.

Predict the output of the following query:
SELECT MOD (9,0);

Q 39.

State whether the following statement is True or False:
In SQL, the HAVING clause is used to apply filter on groups formed by the GROUP BY clause.

Q 40.

What is the output of the following SQL Query ?
SELECT INSTR("KNOWLEDGE","E");

Q 41.

Which of the following is a category of DML (Data Manipulation Language)?

Q 42.

To remove ONLY the trailing space from data values in a column of MySQL table, we use

Q 43.

What will be the output of the following query ?
SELECT SUBSTR("G20 2023 INDIA",5,4);

Q 44.

Which MySQL command helps to add a primary key constraint to any table that has already been created ?

Q 45.

Now() in MySQL returns _______________.

Q 46.

In SQL, ________ returns the month name from the specified date.

Q 47.

With respect to SQL, match the function given in column-II with categories given in column-I:

Q 48.

Identify the SQL command used to delete a relation (table) from a relational database.

Q 49.

Predict the output of the following query:
SELECT LCASE (MONTHNAME ('2023-03-05'));

Q 50.

What is a domain in SQL?

Q 51.

The SQL string function that returns the position of the first occurrence of substring is ________ .

Q 52.

What is a tuple in SQL?

Q 53.

Assertion (A): The ROUND() function in SQL can be used to round off a number to a specified number of decimal places.
Reason (R): The ROUND() function is a string function that accepts character values as input and returns numerical values as output.

Q 54.

Which of the following aggregate function returns the average of values in a specified column of a MySQL table ?

Q 55.

Which of the following is not an aggregate function in SQL?

Q 56.

Which of the following SQL function returns the number of values in the specified column ignoring the NULL values ?

Q 57.

Which SQL statement do we use to find out the total number of records present in the table ORDERS?

Q 58.

Which of the following is a DBMS?

Q 59.

What will be the output of the following query ?
SELECT POWER(2, MOD(17,3));

Q 60.

Which MySQL string function is used to extract a substring from a given string based on a specified starting position and length ?

Q 61.

What is a relation in SQL?

Q 62.

Match the following SQL functions/clauses with their descriptions:

Q 63.

Assertion (A): In SQL, INSERT INTO is a Data Definition Language (DDL) Command.
Reason (R): DDL commands are used to create, modify, or remove database structures, such as tables.

Q 64.

In SQL, the equivalent of UCASE() is:

Q 65.

Which of the following SQL functions does not belong to the Math functions category?

Q 66.

Write the output of the following SQL command :
select round(3456.885, 2);