ExamGecko
Question list
Search
Search

Question 17 - 102-500 discussion

Report
Export

Which of the following SQL queries counts the number of occurrences for each value of the field order_type in the table orders?

A.
SELECT order_type,COUNT(*) FROM orders WHERE order_type=order_type;
Answers
A.
SELECT order_type,COUNT(*) FROM orders WHERE order_type=order_type;
B.
SELECT order_type,COUNT(*) FROM orders GROUP BY order_type;
Answers
B.
SELECT order_type,COUNT(*) FROM orders GROUP BY order_type;
C.
COUNT(SELECT order_type FROM orders);
Answers
C.
COUNT(SELECT order_type FROM orders);
D.
SELECT COUNT(*) FROM orders ORDER BY order_type;
Answers
D.
SELECT COUNT(*) FROM orders ORDER BY order_type;
E.
SELECT AUTO_COUNT FROM orders COUNT order_type;
Answers
E.
SELECT AUTO_COUNT FROM orders COUNT order_type;
Suggested answer: B
asked 18/09/2024
Ankit Parimi
33 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first