Echarts 统计分数区间数据

select '60分以下',count(*) from riskcontrol_inspection_task_book_item where (check_Value +0)<60 and (check_Value REGEXP '[^0-9.]')=0
union
select '60-70分',count(*) from riskcontrol_inspection_task_book_item where (check_Value +0)>=60  and (check_Value +0)<70 and (check_Value REGEXP '[^0-9.]')=0
union
select '70-90分',count(*) from riskcontrol_inspection_task_book_item where (check_Value +0)>=70  and (check_Value +0)<90  and (check_Value REGEXP '[^0-9.]')=0
union
select '90分以上',count(*) from riskcontrol_inspection_task_book_item where (check_Value +0)>=90 and (check_Value REGEXP '[^0-9.]')=0

 

SQL UNION 操作符合并两个或多个 SELECT 语句的结果。

 

 

posted @ 2019-12-30 17:50  I若水  阅读(1654)  评论(0编辑  收藏  举报