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
1107 25 1107 21
1108 35 1108 25
1109 88 1109 68
1110 101 1110 75
1119 6 1119 5
1120 15 1120 14
1121 19 1121 14
1122 34 1122 26
1123 34 1123 28
1124 59 1124 42
1125 56 1125 46
1126 64 1126 53
1127 82 1127 66
1128 99 1128 85
1129 85 1129 72
1130 127 1130 91
1131 58 1131 49
1132 13 1132 9