SQL Server 是否具有与 Excel 的 KURT 函数等效的功能?
Excel 具有 KURT 函数,可返回数据集的峰度。 SQL Server 是否有等效的聚合函数?
Excel has the KURT function that returns the kurtosis of a data set. Does SQL Server have an equivalent aggregate function?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
TSQL 具有计算峰度所需的所有函数,但我认为您必须自己将它们放在一个自定义函数中。
这是我发现的一个实现(参考:SolidQ)
TSQL has all of the functions required to calculate kurtosis, but I think you'd have to put it all together yourself in a custom function.
Here's one implementation I found (ref: SolidQ)
我对此表示怀疑——这是一个晦涩的函数,而且 MySQL 倾向于只实现更接近数学基础核心的函数。
然而,峰度的计算方法相当简单。请参阅此处的公式。
I doubt it—it is a obscure function and MySQL tends to implement functions closer to the base core of mathematics only.
However, Kurtosis is fairly straightforward to calculate yourself. See the formula here.
通过结合 中的方法http://blogs.solidq.com/en/sqlserver/skewness-and-kurtosis-part-1-t-sql-solution/#abh_posts 和 https://sqlwithpanks.wordpress .com/2016/06/22/kurtosis-a-measure-of-tailedness-of-the-distribution/,以下是经过测试的工作版本:
By combine the method from http://blogs.solidq.com/en/sqlserver/skewness-and-kurtosis-part-1-t-sql-solution/#abh_posts and https://sqlwithpanks.wordpress.com/2016/06/22/kurtosis-a-measure-of-tailedness-of-the-distribution/, the following is a tested work version: