0
我需要改善查詢PostgreSQL中提高查詢在PostgreSQL中
select a.*
,(select num
from TABLEA c
where c.one = a.one
and c.two = a.two
and c.three = a.three
and c.four= a.four
and c.five = 'A') as A
,(select num
from TABLEA c
where c.one = a.one
and c.two = a.two
and c.three = a.three
and c.four = a.four
and c.five = 'B') as B
,(select num
from TABLEA c
where c.one = a.one
and c.two = a.two
and c.three = a.three
and c.four = a.four
and c.five = 'C') as C
from TABLEB a
我想只運行一個選擇來獲得A,B,C ....
您的查詢是不可思議的!非常感謝!! –