SQL中的帕累托图

时间:2015-04-21 10:33:05

标签: sql ms-access ms-access-2010 pareto-chart

根据>80的说法,我有桌子,我只想在U1之前使用列。

T1:

User  || C1 || C2 || C3 || C4 || C5 || Total
  U1  || 10 || 20 || 15 || 40 || 15 || 100
  U2  || 27 || 17 || 8  || 23 || 25 || 100

我寻找的答案是这样的表格:

P1:

User  || C2 || C3 || C4 || C5 
  U1  || 20 || 15 || 40 || 15 
  U2  || 17 || 8  || 23 || 25 

1 个答案:

答案 0 :(得分:1)

SELECT *, C1+C2+C3+C4+C5 AS total
FROM t1
WHERE C1+C2+C3+C4+C5 > 80