公司需求有个需要统计当前
rate 字段表示项目进度
未开始(rate=0),进行中(0<rate<100),已完成(rate=100)
SELECT elt( INTERVAL ( learn_rate, 0, 1, 100 ), ‘undo‘, ‘doing‘, ‘done‘ ) AS trainStatus, count( 1 ) AS count FROM aaa GROUP BY elt( INTERVAL ( learn_rate, 0, 1, 100 ), ‘undo‘, ‘doing‘, ‘done‘ )
搞定