【发布时间】:2018-12-18 09:47:49
【问题描述】:
我有一个问题
select count(api_name),api_name from abc_log where id = '1'
group by api_name
很好,我得到了正确的结果。
假设我的输出是
count api_name
1 abc
10 123
12 aaa
0 xxx
但我不需要获取计数为“0”的 apinames
我需要如何编写查询? 提前谢谢..
【问题讨论】:
-
不可能,因为没有 api_name 你没有行
-
你的查询是正确的,你的输出是错误的。
标签: sql database postgresql count