我有 mysql 数据库。
我正在运行以下查询。
SELECT cluster,
infra_properties.property_name property,
count(*)
FROM raw_alerts,
infra_properties
WHERE infra_properties.parent_group = raw_alerts.cluster
AND cluster = 'abuse-content'
AND infra_properties.property_name = 'BigBro'
AND timestamp BETWEEN '2012-12-24 00:00:00' AND '2012-12-24 23:59:59'
GROUP BY cluster;
我的输出为空,但我的要求是计数=0。如下所述。
+---------------+----------+----------+
| cluster | property | count(*) |
+---------------+----------+----------+
| abuse-content | BigBro | 0 |
+---------------+----------+----------+
1 row in set (0.30 sec)