PostgreSql 9.5 for多维数据集

时间:2018-06-29 08:43:28

标签: postgresql olap cube olap-cube

我已经安装了PostgreSQL 9.5.13版本。我想将CUBE函数用于数据仓库。因此,为了进行测试,我创建了一个名为“ sales”的表:

sales table

我应用了以下请求:

con = pyodbc.connect(
                r'DRIVER={ODBC Driver 17 for SQL Server};'
                r'SERVER=;'
                r'DATABASE=;'
                r'UID=;'
                r'PWD='
                )

出现此错误消息:

SELECT
    brand,
    segment,
    SUM (quantity)
FROM
    sales
GROUP BY
    CUBE (brand, segment)
ORDER BY
    brand,
    segment;

据我所知,版本9.5支持ERROR: function cube(text, text) does not exist LINE 8: CUBE (brand, segment) ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. ********** Erreur ********** ERROR: function cube(text, text) does not exist État SQL :42883 Astuce : No function matches the given name and argument types. You might need to add explicit type casts. Caractère : 79 。 该错误的根源是什么?

0 个答案:

没有答案