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
Buna sahibim, bedroom_count tek bir satır değil, bu yüzden bu hatayı veriyor
HATA: ifade olarak kullanılan bir alt sorgu tarafından döndürülen birden çok satır
Bu durumda bu sonucu almam gerekiyor bunun için başka bir çözüm var mı?