本文介绍了在 Access 中计算 SQL 中数据分布的偏度,无需额外的子查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 Access 数据库中有一个数据集,为简单起见,如下所示:
ID 组员工票 ID------ --------- -------- -----------------1 阿乔 1234142 阿乔 123091243 鲍勃 1123213214 鲍勃 2131232141425 山姆 1232142141246 B 仁 4129492184197 B 艾米 12341234213我想要做的是计算分布的统计偏度每个员工都处理过的票.
在一个完美的世界中,我的 SQL 应该是这样的:
SELECT[组], SKEW([myCount]) AS mySkew从(SELECT [Group], [Employee], COUNT(*) AS myCount从我的表GROUP BY [组], [员工])临时表通过...分组[团体];
但是,Access 似乎没有 SKEW
功能.有谁知道我怎么做这个计算?
解决方案
看起来有人已经尝试过并为此创建了一个小型库:
I have a dataset in an Access database that, for simplicity's sake, looks like this:
ID Group Employee Ticket ID ------ --------- -------- ----------------- 1 A Joe 123414 2 A Joe 12309124 3 A Bob 112321321 4 A Bob 213123214142 5 A Sam 123214214124 6 B Jen 412949218419 7 B Amy 12341234213
What I'm trying to do is calculate the statistical skewness of distribution of the number of tickets each employee has handled.
In a perfect world, my SQL would be this:
SELECT
[Group], SKEW([myCount]) AS mySkew
FROM
(
SELECT [Group], [Employee], COUNT(*) AS myCount
FROM MyTable
GROUP BY [Group], [Employee]
)
AS TempTable
GROUP BY
[Group];
However, it appears that Access does not have a SKEW
function. Anyone know how I can do this calculation?
解决方案
It looks like somebody has tried this and created a small library for it here:
这篇关于在 Access 中计算 SQL 中数据分布的偏度,无需额外的子查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!