
MYSQL quiz4
Authored by Symbat Ishanova
Computers
10th Grade

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
30 sec • 1 pt
Retrieve the number of customers in each city who have made more than 5 orders.
SELECT city, COUNT(customer_id) AS num_customers FROM orders GROUP BY city HAVING COUNT(customer_id) > 5;
SELECT city, COUNT(customer_id) AS num_customers FROM orders GROUP BY city WHERE COUNT(customer_id) > 5;
SELECT city, COUNT(customer_id) AS num_customers FROM orders HAVING COUNT(customer_id) > 5 GROUP BY city;
SELECT city, COUNT(customer_id) AS num_customers FROM orders WHERE COUNT(customer_id) > 5 GROUP BY city;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Retrieve the average salary of employees in each department that have more than 10 employees.
SELECT department, AVG(salary) AS avg_salary FROM employees GROUP BY department WHERE COUNT(*) > 10;
SELECT department, AVG(salary) AS avg_salary FROM employees GROUP BY department HAVING COUNT(*) > 10;
SELECT department, AVG(salary) AS avg_salary FROM employees HAVING COUNT(*) > 10 GROUP BY department;
SELECT department, AVG(salary) AS avg_salary FROM employees WHERE COUNT(*) > 10 GROUP BY department;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Retrieve the maximum order amount for each customer who has placed more than 3 orders.
SELECT customer_id, MAX(order_amount) AS max_amount FROM orders GROUP BY customer_id WHERE COUNT(*) > 3;
SELECT customer_id, MAX(order_amount) AS max_amount FROM orders HAVING COUNT(*) > 3 GROUP BY customer_id;
SELECT customer_id, MAX(order_amount) AS max_amount FROM orders GROUP BY customer_id HAVING COUNT(*) > 3;
SELECT customer_id, MAX(order_amount) AS max_amount FROM orders WHERE COUNT(*) > 3 GROUP BY customer_id;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Retrieve the total quantity of products sold for each category where the average price is greater than $50.
SELECT category, SUM(quantity) AS total_quantity FROM products WHERE AVG(price) > 50 GROUP BY category;
SELECT category, SUM(quantity) AS total_quantity FROM products HAVING AVG(price) > 50 GROUP BY category;
SELECT category, SUM(quantity) AS total_quantity FROM products GROUP BY category WHERE AVG(price) > 50;
SELECT category, SUM(quantity) AS total_quantity FROM products GROUP BY category HAVING AVG(price) > 50;
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Retrieve the minimum age of employees in each department who have more than 5 years of experience.
SELECT department, MIN(age) AS min_age FROM employees GROUP BY department HAVING COUNT(*) > 5 AND experience > 5;
SELECT department, MIN(age) AS min_age FROM employees GROUP BY department WHERE COUNT(*) > 5 AND experience > 5;
SELECT department, MIN(age) AS min_age FROM employees HAVING COUNT(*) > 5 AND experience > 5 GROUP BY department;
SELECT department, MIN(age) AS min_age FROM employees WHERE COUNT(*) > 5
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Retrieve the number of customers in each city who have made more than 5 orders.
SELECT city, COUNTCOUNT(customer_id) > 5;
SELECT city, COUNT(customer_id) AS num_customers FROM orders GROUP BY city HAVING COUNT(customer_id) > 5;
SELECT city, COUNT(customer_id) AS num_customers FROM orders HAVING COUNT(customer_id) > 5 GROUP BY city;
SELECT city, COUNT(customer_id) AS num_customers FROM orders WHERE COUNT(customer_id) > 5 GROUP BY city;
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the main purpose of a database?
To organize and store data
To analyze trends and derive insights
To encrypt sensitive information
To manage concurrent access and updates
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
10 questions
BÀI 8. SẮP XẾP VÀ LỌC DỮ LIỆU
Quiz
•
1st - 12th Grade
12 questions
Identity Theft
Quiz
•
8th - 12th Grade
14 questions
C++ - Loops and Random Numbers
Quiz
•
9th - 12th Grade
14 questions
Logičke izjave i funkcije
Quiz
•
8th - 10th Grade
15 questions
Code.org Lesson 1-14
Quiz
•
9th - 12th Grade
10 questions
Computer in the society
Quiz
•
2nd - 10th Grade
14 questions
BÀI 14- THUẬT TOÁN TÌM KIẾM TUẦN TỰ
Quiz
•
6th Grade - University
13 questions
Ασφάλεια και προστασία στο διαδίκτυο
Quiz
•
9th - 11th Grade
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
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
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
Exploring Valentine's Day with Charlie Brown
Interactive video
•
6th - 10th Grade
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Valentine's Day History and Traditions
Interactive video
•
6th - 10th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade
10 questions
Valentine's Day: History and Modern Celebration
Interactive video
•
9th - 12th Grade
11 questions
Valentine's Day Trivia
Quiz
•
8th - 12th Grade
10 questions
Factor Quadratic Expressions with Various Coefficients
Quiz
•
9th - 12th Grade