错误:返回和sql元组描述不兼容

时间:2019-12-02 10:25:33

标签: postgresql-9.1 crosstab

 SELECT * 
 FROM crosstab( 'SELECT CAST (aa.name AS text) as namess,
                        CAST(sum(round(credit,2)) AS FLOAT) AS credit,
                        CAST (am.name AS text) as movesss 
                 FROM account_move am
                  JOIN account_move_line aml ON (am.id=aml.move_id)
                  JOIN account_account aa ON (aa.id=aml.account_id) 
                 where   am.journal_id=12 and am.company_id=3 
                 GROUP BY aa.name,am.name ORDER BY am.name'
              )  AS final_result(namess text,credit double precision, movesss text);

在运行此代码时遇到此错误

0 个答案:

没有答案