I need to group results and give it another name as a result.
For example, I have the following fruits and the number of fruits:
apples 6
oranges 4
grapes 9
watermelons 7
pineapples 5
I would like to group them according to their sizes:
small 9 (consists of grapes)
medium 10 (consists of apples and oranges)
large 12 (consists of watermelons and pineapples)
Edit: I think my previous question is not an accurate representation of how I want my results to look like.
Let me provide another example:
I have the following list:
Parameter Tampering 10
SQL Injection 15
Stealth Commanding 20
URL Access Control 5
Unicode Directory Traversal 25
I need to group them according to the OWASP 2013 list:
Injection (consists of Parameter Tampering, SQL Injection, and Stealth Commanding and etc) 45
Cross Site Scripting (consists of Cross Site Scripting) 0
Insecure Direct Object References (consists of Parameter Tampering, Unicode Directory Traversal, and Stealth Commanding and etc) 55
Missing Function Level Access Control (consists of Unicode Directory Traversal and etc) 25
Cross Site Request Forgery (consists of Cross Site Scripting and Stealth Commanding) 20
...
There are repeated items that I need to group too, so eval case does not work in my case.
I also want to display all the groups, even though they do not return a result.
... View more