select case
when p.property_type ='APARTMENT_COMMUNITY'
then (select fp.bedroom_count
from floor_plans fp
where fp.removed = false
and fp.property_id=p.id)
else (select pu.bedroom_count
from property_units pu
where pu.removed = false
and pu.property_id=p.id)
end
from properties p
where p.id =550
Eu am asta,bedroom_count nu este un singur rând,așa că dă această eroare
EROARE: mai mult de un rând returnate de o subinterogare folosit ca o expresie
Am nevoie pentru a obține acest rezultat în acest caz nu există nici o altă soluție pentru asta?