Q1:
2025: 30 May Shift 2
Informatics Practices
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;
2025: 30 May Shift 2
Informatics Practices
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;
2025: 30 May Shift 2
Informatics Practices
SQL Functions
Easy
Informatics Practices
Write the output produced by the following SQL command:
SELECT pow(length("Informatics Practices"),1);
2025: 30 May Shift 2
Informatics Practices
SQL Functions
Easy
Informatics Practices
Which function extracts the year value from a date?
2025: 30 May Shift 2
Informatics Practices
SQL Functions
Medium
Informatics Practices
Write the output produced by the following SQL command:
SELECT ROUND(342.9234,-1);
2025: 27 May Shift 2
Informatics Practices
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)
2025: 27 May Shift 2
Informatics Practices
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.
2025: 27 May Shift 2
Informatics Practices
SQL Functions
Easy
Informatics Practices
What will be the output of round(2912.564, 1)?
2025: 27 May Shift 2
Informatics Practices
SQL Functions
Medium
Informatics Practices
Match List-I with List-II
| List-I | List-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(*) |
2025: 27 May Shift 2
Informatics Practices
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
2025: 27 May Shift 2
Informatics Practices
SQL Functions
Easy
Informatics Practices
What will be the output of the following query?
SELECT NOW( ) ;
2025: 22 May Shift 1
Informatics Practices
SQL Functions
Easy
Informatics Practices
Which of the following is TRUE for union operation in SQL?
2025: 22 May Shift 1
Informatics Practices
SQL Functions
Easy
Informatics Practices
What will be the ouput of following query?
SELECT ROUND(3.144, 1);
2025: 22 May Shift 1
Informatics Practices
SQL Functions
Easy
Informatics Practices
| EmpID | EmpName | Dept. | Salary | Location | Rating |
|---|---|---|---|---|---|
| 201 | Smith | IT | 75000 | Chicago | 4.5 |
| 202 | Jane | HR | 60000 | New York | 4.7 |
| 203 | Alice | Finance | 80000 | San Francisco | 4.8 |
| 204 | Bob | IT | 76000 | Denver | 4.6 |
| 205 | Sarah | Marketing | 68000 | Seattle | 4.9 |
From the above table 'EMPLOYEE', which query will retrieve employees with rating above 4.6?
2025: 22 May Shift 1
Informatics Practices
SQL Functions
Easy
Informatics Practices
To return the number of characters in a specified string, the correct syntax is _____.
2025: 22 May Shift 1
Informatics Practices
SQL Functions
Easy
Informatics Practices
Which of the following are single row functions?
(A). LTRIM( )
(B). DAYNAME( )
(C). AVG( )
(D). MOD( )
2025: 22 May Shift 1
Informatics Practices
SQL Functions
Easy
Informatics Practices
| EmpID | EmpName | Dept. | Salary | Location | Rating |
|---|---|---|---|---|---|
| 201 | Smith | IT | 75000 | Chicago | 4.5 |
| 202 | Jane | HR | 60000 | New York | 4.7 |
| 203 | Alice | Finance | 80000 | San Francisco | 4.8 |
| 204 | Bob | IT | 76000 | Denver | 4.6 |
| 205 | Sarah | Marketing | 68000 | Seattle | 4.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
2025: 21 May Shift 1
Informatics Practices
SQL Functions
Easy
Informatics Practices
______ function is used to get a specified day of the month for a given date.
2025: 21 May Shift 1
Informatics Practices
SQL Functions
Medium
Informatics Practices
Which of the following group function will NOT ignore NULL values?
2025: 21 May Shift 1
Informatics Practices
SQL Functions
Medium
Informatics Practices
From the table 'Orders' below:
| order_Id | customer_Id | order_date | amount |
|---|---|---|---|
| 1 | 101 | 2024-03-01 | 2500 |
| 2 | 102 | 2024-03-01 | 12000 |
| 3 | 101 | 2024-03-31 | 3000 |
| 4 | 103 | 2024-04-01 | 4500 |
| 5 | 102 | 2024-04-30 | 8000 |
Which query will retrieve the total amount from 'Orders' made by customer_Id = 101 in the month of March 2024.
2025: 21 May Shift 1
Informatics Practices
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
2025: 21 May Shift 1
Informatics Practices
SQL Functions
Hard
Informatics Practices
From the table 'Students' and 'Graduates' below:
Students
| Student_ID | FirstName | LastName |
|---|---|---|
| 1 | Arun | Singh |
| 2 | Ajay | Verma |
| 3 | Ashi | Kushwaha |
Graduates
| Graduate_ID | FirstName | LastName |
|---|---|---|
| 1 | Dhruv | Manchandani |
| 2 | Ajay | Verma |
| 3 | Alok | Ranjan |
If you want the names of the individuals who are listed in both the 'Students' and 'Graduates' tables, which SQL statement would you use?
2025: 21 May Shift 1
Informatics Practices
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.
2025: 20 May Shift 1
Informatics Practices
SQL Functions
Easy
Informatics Practices
Match List-I with List-II
| List-I | List-II |
|---|---|
| (A) MONTHNAME() | (I) Text function |
| (B) MOD() | (II) Aggregate function |
| (C) AVG() | (III) Date function |
| (D) LENGTH() | (IV) Math function |
2025: 20 May Shift 1
Informatics Practices
SQL Functions
Easy
Informatics Practices
Find the output of the following query:
SELECT LEFT(RIGHT(UCASE('computer science'),7),3);
2025: 20 May Shift 1
Informatics Practices
SQL Functions
Easy
Informatics Practices
Match List-I with List-II
| List-I | List-II |
|---|---|
| (A) order by | (I) cardinality |
| (B) substr() | (II) date function |
| (C) count(*) | (III) sorting |
| (D) now() | (IV) mid() |
2025: 20 May Shift 1
Informatics Practices
SQL Functions
Medium
Informatics Practices
State the output of the following query:-
SELECT MOD(987,0);
2025: 20 May Shift 1
Informatics Practices
SQL Functions
Easy
Informatics Practices
State the output:
SELECT MONTH('2003/11/6');
2025: 20 May Shift 1
Informatics Practices
SQL Functions
Easy
Informatics Practices
State the output of the following query :-
SELECT ROUND(3456.345,0);
2025: 16 May Shift 1
Informatics Practices
SQL Functions
Easy
Informatics Practices
Consider the following table 'Student'.
Student
| RollNo | Marks |
|---|---|
| 101 | 3 |
| 201 | 3 |
| 301 | 3 |
Which of the following statements will give the same output?
(A) MAX(Marks)
(B) MIN(Marks)
(C) AVG(Marks)
(D) COUNT(Marks)
2025: 16 May Shift 1
Informatics Practices
SQL Functions
Easy
Informatics Practices
What is output of the following SQL statement?
SELECT LEFT((RIGHT("INFORMATION",3),2);