
SQL Queries Practical
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Bendangmenla Bendangmenla
Used 6+ times
FREE Resource
Enhance your content in a minute
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the basic syntax for a SELECT query in SQL?
SELECT column1, column2 WHERE table_name;
SELECT column1, column2 FROM table_name;
SELECT column1 column2 FROM table_name;
SELECT * FROM table_name;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the difference between INNER JOIN and LEFT JOIN.
INNER JOIN returns all rows from the left table
LEFT JOIN returns only matching rows
INNER JOIN compares and returns only matching rows, LEFT JOIN returns all rows from the left table and matched rows from the right table
INNER JOIN combines all rows from both tables
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are some common aggregate functions in SQL?
TOTAL
COUNT, SUM, AVG, MIN, MAX
AVERAGE
SMALLEST
BIGGEST
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you use a subquery in a WHERE clause?
SELECT * FROM table_name WHERE column_name = (SELECT column_name FROM another_table WHERE condition)
SELECT * FROM table_name WHERE column_name = (SELECT column_name FROM another_table WHERE condition) ORDER BY column_name
SELECT * FROM table_name WHERE column_name = (SELECT column_name FROM another_table WHERE condition) OR column_name = value
SELECT * FROM table_name WHERE column_name = (SELECT column_name FROM another_table WHERE condition) AND column_name = value
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Write a query to retrieve the average salary of employees in a table.
SELECT MAX(salary) FROM employees;
SELECT AVG(salary) FROM employees;
SELECT SUM(salary) FROM employees;
SELECT MIN(salary) FROM employees;
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When would you use a self-join in SQL?
When you want to insert new rows into a table
When you need to delete rows from a table
When you need to perform aggregate functions on a table
When you need to compare rows within the same table.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the GROUP BY clause in SQL?
To sort rows in ascending order
To update values in a table
To filter rows based on a condition
To group rows with the same values together for aggregate function calculations.
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
untitled
Quiz
•
8th Grade - University
25 questions
QUIZ
Quiz
•
University
25 questions
IT Quiz | E-Zone
Quiz
•
University
26 questions
AI Quiz 26/9
Quiz
•
University
26 questions
Set 2
Quiz
•
University - Professi...
25 questions
Understanding Input, Selection and Loops in Python
Quiz
•
7th Grade - University
25 questions
SQL Quiz: 25 MCQs on the Student Table
Quiz
•
University
25 questions
DevOps Quiz
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
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
