Home »
MCQs »
MariaDB MCQs
Which is the correct MariaDB query for finding the maximum value and grouping the results?
43. Which is the correct MariaDB query for finding the maximum value and grouping the results?
- SELECT std_name, MAX(score) FROM students;
- SELECT std_name, MAX(score) FROM students GROUP BY std_name;
- SELECT std_name, MAX(score) FROM students ORDER BY std_name;
- SELECT std_name, MAX(score) FROM students GROUP BY std_name ASC;
Answer: B) SELECT std_name, MAX(score) FROM students GROUP BY std_name;
Explanation:
The correct MariaDB query for finding the maximum value and grouping the results:
Syntax:
SELECT std_name, MAX(score) FROM students GROUP BY std_name;