<pre>
SELECT
"public".geopoint.longitude,
"public".geopoint.latitude,
"public".geopoint.coordrefsys,
"public".geopoint.distance,
"public".geopoint.bearing,
"public".geopoint.frompoint_guid,
"public".geopoint.coordformat,
"public".geopoint.userinputformat,
"public".geopoint.user_entered_x,
"public".geopoint.user_entered_y,
"public".geopoint.user_entered_mgrs,Count("public".geopoint.geopoint_guid)
FROM
"public".geopoint
("public".geopoint.distance IS NOT NULL or "public".geopoint.bearing is NOT NULL)
AND ("public".geopoint.frompoint_guid IS NOT NULL))
GROUP BY
"public".geopoint.coordrefsys,
"public".geopoint.coordformat,
"public".geopoint.userinputformat,
"public".geopoint.user_entered_x,
"public".geopoint.user_entered_y,
"public".geopoint.user_entered_mgrs
ORDER BY
"public".geopoint.userinputformat ASC1,2,3
</pre>