Given a table of data with two columns, write a SQL query to find the median value in the second column.
Given a table of data with two columns, write a SQL query to find the median value in the second column. Example input: id | value ---|------ 1 | 3 2 | 5 3 | 7 4 | 9 Example output: 5
/* The solution below is optimal because it uses the median function, which is a built-in function in SQL. */ SELECT MEDIAN(value) FROM table;
The candidate's solution is correct and uses the median function, which is a built-in function in SQL.
Evaluated at: 2022-11-18 04:15:48