
DB QUIZ 1
Authored by AMMAR NAZAR
Other
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which of the following queries will correctly select all rows where the "age" column is between 20 and 30, inclusive, and sorted by "name" in descending order?
SELECT * FROM users WHERE age >= 20 OR age <= 30 ORDER BY name DESC;
SELECT * FROM users WHERE age BETWEEN 20 AND 30 ORDER BY name DESC;
SELECT * FROM users WHERE age >= 20 AND age <= 30 ORDER BY name ASC;
SELECT * FROM users WHERE age BETWEEN 20 AND 30 ORDER BY name ASC;
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What is the output of the following query if the "salary" column contains NULL values?
SELECT COUNT(salary) FROM employees;
Count of all rows including NULLs
Count of all rows excluding NULLs
Count of only NULL values
Syntax error
3.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which SQL query will delete only the first 10 rows from a table "orders" with 1000 rows?
DELETE FROM orders LIMIT 10;
TRUNCATE orders LIMIT 10;
DELETE TOP 10 FROM orders;
REMOVE FROM orders LIMIT 10;
4.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
8. What does the following query do?
SELECT * FROM users WHERE name LIKE 'A%' AND age > 30 OR city = 'New York';
A. Returns users whose name starts with 'A' and age > 30 and live in New York
B. Returns users whose name starts with 'A' and age > 30 or live in New York
C. Returns only users from New York
D. Syntax error
5.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
13. What does this query return?
SELECT * FROM orders WHERE product_name LIKE '%phone%';
Orders containing 'phone' anywhere in the product name
Orders where the product name starts with 'phone'
Orders where the product name ends with 'phone'
Syntax error
6.
FILL IN THE BLANK QUESTION
45 sec • 1 pt
Retrieve all employees who are either in the 'Sales' department or have a salary above 50,000 but exclude those whose names start with 'A' and who are not in 'HR':
7.
FILL IN THE BLANK QUESTION
45 sec • 1 pt
Select the top 3 highest paid employees, including those with NULL salaries, but order NULLs last:
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
12 questions
National Day Quiz
Quiz
•
University
13 questions
football of world
Quiz
•
1st Grade - University
13 questions
Anime 99
Quiz
•
9th Grade - Professio...
10 questions
Hypersonic Missiles and Directed Energy Weapons
Quiz
•
University
12 questions
Week 16 - Primary Survey Recap
Quiz
•
University - Professi...
10 questions
Bollywood
Quiz
•
5th Grade - Professio...
10 questions
Safety Practices in Construction
Quiz
•
University
15 questions
Overview of E-Banking
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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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
Discover more resources for Other
7 questions
How James Brown Invented Funk
Interactive video
•
10th Grade - University
5 questions
Helping Build the Internet: Valerie Thomas | Great Minds
Interactive video
•
11th Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
19 questions
Review2-TEACHER
Quiz
•
University
15 questions
Pre2_STUDENT
Quiz
•
University
20 questions
Ch. 7 Quadrilateral Quiz Review
Quiz
•
KG - University