Note that radius unit is decimal degrees.
Target table: mer_catalogue
SELECT right_ascension, declination, object_id, vis_det, det_quality_flag, flux_detection_total, flux_vis_sersic, flux_y_sersic, flux_j_sersic, flux_h_sersic, segmentation_map_id, segmentation_area, kron_radius, DISTANCE(267.78, 65.53, right_ascension, declination) AS dist FROM mer_catalogue WHERE DISTANCE(267.78, 65.53, right_ascension, declination) < 0.1
Target table: mer_catalogue
SELECT mer.right_ascension, mer.declination, phz_class.* FROM mer_catalogue AS mer JOIN phz_classification AS phz_class USING (object_id) WHERE DISTANCE(267.78, 65.53, mer.right_ascension, mer.declination) < 0.1
Target table: phz_star_sed
SELECT count(*) FROM phz_star_sed WHERE phz_star_prob > 0.9
Target table: mer_catalogue
SELECT TOP 10 cat1.right_ascension, cat1.declination, cat1.point_like_prob, cat1.det_quality_flag, cat1.spurious_flag, cat1.flux_detection_total, cat1.mumax_minus_mag, cat1.vis_det, cat1.flux_vis_2fwhm_aper, cat2.spe_z, cat2.spe_z_err FROM mer_catalogue as cat1 JOIN spectro_zcatalog_spe_galaxy_candidates AS cat2 USING(object_id) WHERE cat2.spe_z/cat2.spe_z_err > 10.0
Target table: mer_catalogue
SELECT TOP 20 right_ascension, declination, flux_vis_4fwhm_aper, flux_vis_psf, flux_vis_sersic, flux_detection_total, det_quality_flag, spurious_flag, vis_det FROM mer_catalogue WHERE NULLIF(flux_vis_sersic, 'NaN') > 0.0 ORDER BY flux_vis_sersic DESC
Target table: spectra_source
SELECT spec.ra_obj, spec.dec_obj, spec.source_id, phz.phz_median, mer.flux_h_4fwhm_aper FROM spectra_source AS spec JOIN phz_photo_z AS phz ON spec.source_id = phz.object_id JOIN mer_catalogue AS mer ON spec.source_id = mer.object_id WHERE phz.phz_median BETWEEN 1.0 AND 1.1 AND DISTANCE(ra_obj, dec_obj, 75.0, -45.0) < 6.0
Target table: spectra_source
SELECT *, DISTANCE(ra, dec, 267.78, 65.53) AS dist FROM sedm.mosaic_product WHERE DISTANCE(267.78, 65.53, ra, dec) < 0.5 AND instrument_name = 'VIS'
Target table: mer_catalogue
SELECT mer_cat.right_ascension, mer_cat.declination, mer_cat.segmentation_map_id, phz_class.object_id, phz_class.phz_star_prob, phz_class.phz_gal_prob, phz_class.phz_qso_prob FROM catalogue.mer_catalogue AS mer_cat JOIN phz_classification AS phz_class USING (object_id) WHERE mer_cat.segmentation_map_id / 1000000 = 102158889 AND phz_class.phz_gal_prob > 0.8 ORDER BY phz_class.phz_gal_prob DESC