Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
462 views
in Technique[技术] by (71.8m points)

Calculating skewness of a data distribution in SQL in Access without an additional subquery

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...