add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
WITH cte AS (
select json_array(2, 4) as `array`
union
select json_array(10) as `array`
union
select json_array(2, 3, 4) as `array`
union
select json_array(10, 11) as `array`
)
SELECT *
from cte
order by CAST(JSON_VALUE(`array`, '$[0]') AS INT),
CAST( JSON_VALUE(`array`, '$[1]') AS INT),
CAST(JSON_VALUE(`array`, '$[2]') AS INT)
array
[2, 3, 4]
[2, 4]
[10]
[10, 11]