Suppose I have 2 columns NAME and COUNT.
| NAME | COUNT |
|---|---|
| a1 | 2 |
| a2 | 4 |
| a3 | 5 |
| a4 | 1 |
| a5 | 6 |
| a6 | 2 |
| a7 | 4 |
| a8 | 6 |
| a9 | 7 |
| a10 | 4 |
| a11 | 1 |
I want to select first 5 records and group the rest others as one record( naming that record as others)
The output I need is
| NAME | COUNT |
|---|---|
| a1 | 2 |
| a2 | 4 |
| a3 | 5 |
| a4 | 1 |
| a5 | 6 |
| others | 24 |
In others I need sum of all the count values excluding first 5 records.