exam questions

Exam 102-400 All Questions

View all questions & answers for the 102-400 exam

Exam 102-400 topic 1 question 17 discussion

Actual exam question from LPI's 102-400
Question #: 17
Topic #: 1
[All 102-400 Questions]

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;
  • B. SELECT order_type,COUNT(*) FROM orders GROUP BY order_type;
  • C. COUNT(SELECT order_type FROM orders);
  • D. SELECT COUNT(*) FROM orders ORDER BY order_type;
  • E. SELECT AUTO_COUNT FROM orders COUNT order_type;
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
kstr
2 years, 11 months ago
non LPIC question
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago