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);
<thead>
</thead><tbody>
</tbody>
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 | c2 |
1 | 252 |
2 | 525 |
5 | 21 |
10 | 25 |
150 | 2665 |
15812 | 2511 |
1515 | 2515 |
1518 | 325 |
1548 | 2515 |
1588 | 25 |
1288 | 58 |
12558 | 98 |
1555 | 596 |
<thead>
</thead><tbody>
</tbody>