SELECT ceiling(zoneId/10) AS zoneGroup, count(*) AS detectionCount   SELECT ceiling(zoneId/10) AS zoneGroup, count(*) AS hqDetectionCount  
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
1142 73 1143 3
1143 373 1144 5
1144 545 1145 6
1145 617 1146 10
1146 715 1147 13
1147 806 1148 8
1148 789 1149 4
1149 893 1150 10
1150 945 1151 16
1151 981 1152 4
1152 1027 1153 7
1153 1067 1154 12
1154 1084 1155 5
1155 1088 1156 10
1156 1070 1157 6
1157 1128 1158 8
1158 1123 1159 7
1159 1104 1160 8
1160 1103 1161 8
1161 1139 1162 8
1162 1114 1163 9
1163 1094 1164 5
1164 1022 1165 13
1165 1112 1166 5
1166 1045 1167 9
1167 1074 1168 5
1168 1023 1169 6
1169 940 1170 3
1170 957 1171 11
1171 952 1172 6
1172 816 1173 9
1173 820 1174 8
1174 702 1175 3
1175 631 1176 7
1176 518 1177 2
1177 368
1178 89