case when concat() round()

select 
(case when avg_play_duration/60 >= 1 
then concat(round(avg_play_duration/60,2) ,'m')
else concat(round(avg_play_duration) ,'s') end) as avg_play_duration from table 

你可能感兴趣的:(Mysql原理,数据库,sql,mysql)