我正在使用 Oracle RightNow,它使用 MySQL,但不能有嵌套查询,只能选择(双关语!)数量的命令供我使用:http ://documentation.custhelp.com/euf/assets/devdocs/august2016/Connect_PHP /Content/Connect%20for%20PHP%20API/RightNow%20Object%20Query%20Language/ROQL%20and%20Common%20Objects.htm
不允许使用 CASE 语句
假设我有
Select Count(*) as Amount, Category
From MyTable
Group by Category
一切都很好,我得到一张如下表
Amount | Category
---------------------
1 | Contact Editor
4 | Incident Editor
787 | Raise a Request
78 | Pending Information
我将如何修改我的查询,以便我可以合并前两行以获得一个新的更新表
Amount | Category
---------------------
5 | Editor
787 | Raise a Request
78 | Pending Information
谢谢