gpt4 book ai didi

mysql - Navicat MySQL 中的 NTILE 函数错误

转载 作者:行者123 更新时间:2023-11-29 03:01:37 25 4
gpt4 key购买 nike

我正在尝试使用 NTILE 函数在使用 Navicat for MySQL 的数据集中创建十分位数。我的查询是:

select NTILE(10) over (order by 'amount') decile, *
from dataframe d
order by 'amount';

我得到了错误

[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(order by.....

任何人都可以帮助找出我的查询有什么问题吗?

提前致谢!

最佳答案

NTILE 就是所谓的窗口函数 (MS SQL Info)。

MySQL 没有窗口函数:https://dba.stackexchange.com/questions/40130/mysql-and-window-functions

关于mysql - Navicat MySQL 中的 NTILE 函数错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22825715/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com