Hi,
I have one problem with calculation decile in Access. Namely I want to calculate 10 th,20 th,30 th,40th,50th,60th,70th,80th,90th and 100th decile for numbers in columns c1 and c2 in Table.
I have SQL code for Access, but with this code I can calculate only one value for decile (For example with code below I can calculate decile only for 50th percent and for one column “c1”, but I ‘cant calculate for all 10 category of decile for two columns C1 and C2).
Can anybody help me with this issue?
Thank you in advance.
SQL CODE
SELECT Max([C1]) AS Percentile
FROM
(SELECT TOP 50 PERCENT [C1]
FROM [Tabele]
ORDER BY [C1] ASC);
I have one problem with calculation decile in Access. Namely I want to calculate 10 th,20 th,30 th,40th,50th,60th,70th,80th,90th and 100th decile for numbers in columns c1 and c2 in Table.
I have SQL code for Access, but with this code I can calculate only one value for decile (For example with code below I can calculate decile only for 50th percent and for one column “c1”, but I ‘cant calculate for all 10 category of decile for two columns C1 and C2).
Can anybody help me with this issue?
Thank you in advance.
SQL CODE
SELECT Max([C1]) AS Percentile
FROM
(SELECT TOP 50 PERCENT [C1]
FROM [Tabele]
ORDER BY [C1] ASC);
Table
c1[FONT="][/FONT]
c2[FONT="][/FONT]
1[FONT="][/FONT]
252[FONT="][/FONT]
2[FONT="][/FONT]
525[FONT="][/FONT]
5[FONT="][/FONT]
21[FONT="][/FONT]
10[FONT="][/FONT]
25[FONT="][/FONT]
150[FONT="][/FONT]
2665[FONT="][/FONT]
15812[FONT="][/FONT]
2511[FONT="][/FONT]
1515[FONT="][/FONT]
2515[FONT="][/FONT]
1518[FONT="][/FONT]
325[FONT="][/FONT]
1548[FONT="][/FONT]
2515[FONT="][/FONT]
1588[FONT="][/FONT]
25[FONT="][/FONT]
1288[FONT="][/FONT]
58[FONT="][/FONT]
12558[FONT="][/FONT]
98[FONT="][/FONT]
1555[FONT="][/FONT]
596[FONT="][/FONT]