Find most common value in SQL table

Given a table with two columns, this SQL query will find the most common value in the second column.

Problem

Given a table with two columns, write a SQL query to find the most common value in the second column.
Example input:
id | value
1  | 3
2  | 5
3  | 3
4  | 5
5  | 3
Example output:
3

Solution

This solution is in SQL. Our A.I. can create solutions in multiple languages.
by sarastevens
SELECT value, COUNT(*) AS count
FROM table
GROUP BY value
ORDER BY count DESC
LIMIT 1;

/*

The above solution is optimal because it uses a single query to find the most common value in the second column.

*/

A.I. Evaluation of the Solution

The candidate's solution is complete and solves the problem. The approach is straightforward and uses a single query to find the most common value in the second column.

Evaluated at: 2022-11-22 04:15:54