SELECT DISTINCT
tpprc.recipient_redemption_amount_pl_multiselect_id,
r1."name" AS recipient_redemption_amount_name,
tpprc.ransom_amount_type_pl_multiselect_id,
r2."name" AS ransom_amount_type_name
FROM prod_line.table_param_pl_redemption_coeff tpprc
LEFT JOIN prod_line.hb_param_pl_multiselect r1
ON r1.id = tpprc.recipient_redemption_amount_pl_multiselect_id
LEFT JOIN prod_line.hb_param_pl_multiselect r2
ON r2.id = tpprc.ransom_amount_type_pl_multiselect_id
WHERE tpprc.recipient_redemption_amount_pl_multiselect_id IS NOT NULL
OR tpprc.ransom_amount_type_pl_multiselect_id IS NOT NULL
ORDER BY
recipient_redemption_amount_name,
ransom_amount_type_name;