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 ....
您的查询是不可思议的!非常感谢!! –