关于string类型只能转换为double数字类型进行排序
case1:
select cast(num as double) as num1
from (
select DISTINCT regexp_replace(categories,'\[|\]','') as num
from table_name
WHERE dt=20180115
and categories is not null
)
ORDER BY num1
关于string类型只能转换为double数字类型进行排序
case1:
select cast(num as double) as num1
from (
select DISTINCT regexp_replace(categories,'\[|\]','') as num
from table_name
WHERE dt=20180115
and categories is not null
)
ORDER BY num1