Unverified Commit 9c34c65c authored by zhangyongtian's avatar zhangyongtian Committed by GitHub

[Fix][admin] H2 SQL file exceptions and divide by zero exceptions (#2356)

* [Fix][admin] H2 SQL file exceptions and divide by zero exceptions * [Fix][admin] Remove designated tenants
parent a4b189de
This diff is collapsed.
...@@ -98,12 +98,17 @@ ...@@ -98,12 +98,17 @@
</select> </select>
<select id="getTaskOnlineRate" resultType="org.dinky.data.model.JobTypeOverView"> <select id="getTaskOnlineRate" resultType="org.dinky.data.model.JobTypeOverView">
select dialect jobType, SELECT dialect jobType,
round(coalesce(sum(case when step = 5 then 1 else 0 end) / round(coalesce(sum(CASE WHEN step = 5 THEN 1 ELSE 0 END) /
sum(case when step <![CDATA[ < ]]> 5 then 1 else 0 end) * 100, 0), 2) rate CASE
from dinky_task WHEN sum(CASE WHEN step <![CDATA[ < ]]> 5 THEN 1 ELSE 0 END) = 0 then 1
where enabled = 1 else sum(CASE WHEN step <![CDATA[ < ]]> 5 THEN 1 ELSE 0 END) end
group by dialect *
100, 0),
2) rate
FROM dinky_task
WHERE enabled = 1
GROUP BY dialect
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment