0
我的查詢:如何在postgres中選擇一列?
select c.id, sum(case when r.paid_out>='1' then 0 else 1 end) as all_paids
from people p1, houses h, policies p2, receipts r
where p1.id = h.id
and h.code = p2.code
and p2.code_policy = r.code_policy
group by p1.id
having all_paids= 0;
Postesql回到我下面的錯誤:
錯誤:沒有列 'all_paids'
我已經試過幾件事,但沒有任何幫助表示讚賞