2

我正在尝试使用 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.....

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

提前致谢!

4

1 回答 1

1

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

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

于 2014-04-03T02:24:38.677 回答