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
1106 10
1107 23
1108 25
1109 33
1110 7