
Break the Query Round-1
Authored by HARIHARAN 20ITA13
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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);
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
25 questions
Understanding Loops in Programming
Quiz
•
University
25 questions
sheet 3
Quiz
•
University
25 questions
Computer Programming Midterms
Quiz
•
University
25 questions
COMP1: Quiz No. 1
Quiz
•
University
25 questions
Layering Models
Quiz
•
University
25 questions
Simple Machines
Quiz
•
KG - University
25 questions
Computer Application TQ1
Quiz
•
1st Grade - University
25 questions
Advanced Game Design Midterm
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
7 questions
Fragments, Run-ons, and Complete Sentences
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
10 questions
DNA Structure and Replication: Crash Course Biology
Interactive video
•
11th Grade - University
5 questions
Inherited and Acquired Traits of Animals
Interactive video
•
4th Grade - University
5 questions
Examining Theme
Interactive video
•
4th Grade - University
20 questions
Implicit vs. Explicit
Quiz
•
6th Grade - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University