我正在尝试构建一个查询来查看我们的帮助台系统中的票证。我想在主题或描述字段中搜索一些关键字,即“电子邮件”,并返回每个关键字的计数。下面是一个示例表。还有一个类别行,但是维护得不好,所以大部分字段都是空的。
ID | Subject | Description
-----+-------------------------------------
1 | hellloooo | can't send email
2 | email down? | can't get to intranet
3 | Phone trouble | can't check voicemail
4 | Using my phone | I don't know how
5 | Need new mouse | please replace
6 | Mouse acting funny | n/a
7 | Intranet won't Load | what's this plug do?
8 | not getting voicemail | why not?
我想返回类似的东西
Category | # of tickets
---------------------------
Email | 3
Phone | 2
Intranet | 2
最简单的方法是什么?