Загрузка данных


case
    when hs.name = 'Этап накопления' then 1
    when hs.name = 'Этап выплаты' then 2
end as accumulation_payment_stage