Задание: 96 (ZrenBy: 2003-09-01)
Вывести название баллончика
with r as (select v.v_name,
v.v_id,
count(case when v_color = 'R' then 1 end) over(partition by v_id) cnt_r,
count(case when v_color = 'B' then 1 end) over(partition by b_q_id) cnt_b
from utV v join utB b on v.v_id = b.b_v_id)
select v_name
from r
where cnt_r > 1
and cnt_b > 0
group by v_name