由于缺乏语言经验,我遇到了一些问题,希望您的帮助...
我希望代码返回表格,如下例所示:
T01 -- T02 -- T03
23,00 32,00 43,00
所以,这是我的代码:
SELECT
SUM([TOTAL $]) AS T01
FROM PFIN_base
WHERE [COORD] = 'alfa'
UNION
SELECT
SUM([TOTAL $]) AS T02
FROM PFIN_base
WHERE [COORD] = 'beta'
UNION
SELECT
SUM([TOTAL $]) AS T03
FROM PFIN_base
WHERE [COORD] = 'gama'
此代码返回以下结果:
T01
23,00
32,00
43,00
我怎样才能得到想要的结果?谢谢!