Skip to content

Commit 011592d

Browse files
committed
3: "Mixed" load type
1 parent ea38294 commit 011592d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

sql/3_load_profiles.sql

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,14 @@ select
7777
case when processed_tup_total > 0 then n_tup_upd::numeric / processed_tup_total else 0 end
7878
from ops
7979
)
80-
select upper(opname) || ' ~' || round(100 * ratio, 2)::text || '%' as zz
80+
select
81+
case
82+
when ratio > .7 then upper(opname) || ' ~' || round(100 * ratio, 2)::text || '%'
83+
else 'Mixed: ' || (
84+
select string_agg(upper(opname) || ' ~' || round(100 * ratio, 2)::text || '%', ', ' order by ratio desc)
85+
from (select * from ops_ratios where ratio > .2) _
86+
)
87+
end
8188
from ops_ratios
8289
order by ratio desc
8390
limit 1

0 commit comments

Comments
 (0)