I have an Issues DataBase, with many solutions open/closed for each issue in a view. My chalenge is take all the answers, break it in each words it as was writed, and count these words separeted by column for the entire number of issues stored in this Data Base (view).
Sample.:
SELECT * FROM VW_ISSUE_REPORT;
issueID | ProblemReported | Solution | IsClosed |
---|---|---|---|
1 | Printer Offline | Turn On the Printer ABC | Yes |
2 | Printer Paper Jam | Remove Paper Jam from Printer ABC | No |
Result expected: (This is a historical database, I can't create functions, procedures, etc. Just a smart, and well known SELECT statement.).
SELECT MAGIC_SOLUTION( Solution) AS SolutionKeyWord , COUNT('X') AS SolutionRepetitions FROM VW_ISSUE_REPORT GROUP BY MAGIC_SOLUTION( Solution);
SolutionKeyWord | SolutionRepetitions |
---|---|
ABC | 2 |
Printer | 2 |
from | 1 |
Jam | 1 |
On | 1 |
Paper | 1 |
Remove | 1 |
the | 1 |
Turn | 1 |
Best Regards