SELECT ceiling(zoneId/10) AS zoneGroup, count(*) AS detectionCount   SELECT ceiling(zoneId/10) AS zoneGroup, count(*) AS detectionCount  
FROM P2Detection   FROM P2Detection  
GROUP BY ceiling(zoneId/10) WHERE raErr < 0.1 AND decErr < 0.05
ORDER BY ceiling(zoneId/10) GROUP BY ceiling(zoneId/10)
ORDER BY ceiling(zoneId/10)
zoneGroup detectionCount
zoneGroup hqDetectionCount
1105 2 1105 2
1106 10 1106 9
1107 23 1107 18
1108 25 1108 16
1109 33 1109 28
1110 7 1110 5