(case when duration>=0*60 and duration<5*60 then "[0-5>"
when duration>=5*60 and duration<10*60 then "[5-10>"
when duration>=10*60 and duration<15*60 then "[10-15>"
else "15 or more" end
) as bin
ELT(INTERVAL(duration,0,60*5,60*10,60*15),'[0-5>','[5-10>','[10-15>','15 or more') as bin
标签:case,10,15,INTERVAL,when,60,duration
From: https://www.cnblogs.com/yhm138/p/17632470.html