我正在尝试使用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.....
任何人都可以帮忙弄清楚我的查询有什么问题吗?
提前致谢!
答案 0 :(得分:1)
NTILE是所谓的窗口函数(MS SQL Info)。
MySQL没有窗口函数:https://dba.stackexchange.com/questions/40130/mysql-and-window-functions