【问题标题】:NTILE function error in Navicat MySQLNavicat MySQL 中的 NTILE 函数错误
【发布时间】:2014-04-03 00:39:58
【问题描述】:

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

谁能帮助找出我的查询出了什么问题?

提前致谢!

【问题讨论】:

  • MySql 还没有实现NTILE

标签: mysql navicat


【解决方案1】:

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

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

【讨论】:

  • 你会如何在 mysql 中选择 3 个四分位数的集合?
猜你喜欢
  • 2011-04-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多