Find the id of the row with the maximum value

The problem is asking for the id of the row with the maximum value in a table with two columns, "id" and "value". An example input and output is given.

Problem

Given a table with two columns, "id" and "value", write a SQL query to find the id of the row with the maximum value.
Example input:
id | value
1  | 10
2  | 20
3  | 30
Example output:
3

Solution

This solution is in SQL. Our A.I. can create solutions in multiple languages.
by sarastevens
SELECT id FROM table ORDER BY value DESC LIMIT 1;

/*

The above solution is optimal because it only requires one pass through the table.

*/

A.I. Evaluation of the Solution

The candidate's solution is correct and demonstrates a good understanding of SQL. The solution is also efficient, as it only requires one pass through the table.

Evaluated at: 2022-11-25 08:16:01