
Break the Query Round-1

Quiz
•
Computers
•
University
•
Hard
HARIHARAN 20ITA13
Used 1+ times
FREE Resource
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Write the SQL query to get the third maximum salary of an employee from a table named employees.
SELECT * FROM(
SELECT employee_name, salary, DENSE_RANK()
OVER(ORDER BY salary DESC)r FROM Employee)
WHERE r=3;
SELECT * FROM(
SELECT employee_name, salary, DENSE_RANK()
OVER(ORDER BY salary ASC)r FROM Employee)
WHERE r=5;
SELECT * FROM(
SELECT employee, salary, DENSE_RANK()
OVER(GROUP BY salary )a FROM Employee)
WHERE r=2;
None of these
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If the SQL table has duplicate rows, the duplicate rows must be removed.
Let’s assume the following table as our dataset:
DELETE table WHERE ID IN (SELECT ID, COUNT(ID) FROM table ORDER BY ID HAVING COUNT (ID) > 5);
REMOVE FROM table where ID IN (SELECT ID, COUNT(ID) FROM table BY ID HAVING COUNT (ID) > 1);
DELETE FROM table WHERE ID IN (SELECT ID, COUNT(ID) FROM table GROUP BY ID HAVING COUNT (ID) > 1);
None of these
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Syntax for SQL CAST function
CAST(expression TO [data type])
CAST(expression AS [data type])
CAST(expression IN [data type])
CAST(expression FOR [data type])
4.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
What are the operators available in SQL?
Arithmetic Operators
Relational Operator
Logical
Operations
Comparison
Operators
5.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
The ways to get the count of records in a table?
SELECT * FROM table1
SELECT COUNT(*) FROM table1
None of these
SELECT rows FROM
sysindexes
WHERE id =
OBJECT_ID(table1) AND indid
< 2
6.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Write a SQL query to find the names of employees that begin with ‘A’?
Consider Table name and column name are emp_details and EmpName
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider a table named "employees" with columns "id", "name", "department", and "salary". Write a SQL query to display the names of employees who earn more than the average salary.
SELECT emp_name FROM employee WHERE salary > (SELECT AVG(salary) FROM employees);
SELECT emp_name FROM employee WHERE salary > (SELECT AVG(salary) FROM employees);
All of these
SELECT name FROM employee WHERE salary < (SELECT AVG(salary) FROM employee);
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Quiz - 2 ( DQL, DDL, DML, Joins and Set

Quiz
•
University
25 questions
My-SQL

Quiz
•
University
25 questions
soal semester 1 kelas 9

Quiz
•
9th Grade - University
25 questions
SQL Quiz: 25 MCQs on the Student Table

Quiz
•
University
31 questions
Java/ Фінальний тест

Quiz
•
9th Grade - Professio...
25 questions
Premiere Pro Tools I

Quiz
•
6th Grade - University
35 questions
JavaScript Control Flow and Loops.

Quiz
•
10th Grade - University
25 questions
SOFAPP QUIZ: MS Word Basics and Intermediate Quiz

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Appointment Passes Review

Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
Grammar Review

Quiz
•
6th - 9th Grade