Your SQL command was:
SELECT TOP 10 
 obj.run, obj.camCol, str(obj.field, 3) as field,
 str(obj.rowc, 6, 1) as rowc, str(obj.colc, 6, 1) as colc,
 str(dbo.fObj(obj.objId), 4) as id, 
 str(obj.psfMag_g - 0*obj.extinction_g, 6, 3) as g,
 str(obj.psfMag_r - 0*obj.extinction_r, 6, 3) as r,
 str(obj.psfMag_i - 0*obj.extinction_i, 6, 3) as i,
 str(obj.psfMag_z - 0*obj.extinction_z, 6, 3) as z,
 str(60*distance, 3, 1) as D,
 dbo.fField(neighborObjId) as nfield,
 str(dbo.fObj(neighborObjId), 4) as nid
FROM
 (SELECT obj.objId,
 run, camCol, field, rowc, colc,
 psfMag_u, extinction_u,
 psfMag_g, extinction_g,
 psfMag_r, extinction_r,
 psfMag_i, extinction_i,
 psfMag_z, extinction_z,
 NN.neighborObjId, NN.distance
 FROM PhotoObj as obj
 JOIN neighbors as NN on obj.objId = NN.objId
 WHERE
 60*NN.distance between 0 and 15 and
 NN.mode = 1 and NN.neighborMode = 1 and
 run = 756 and camCol = 5 and
 obj.type = 6 and (obj.flags & 0x40006) = 0 and
 nchild = 0 and obj.psfMag_i < 20 and
 (g - r between 0.3 and 1.1 and r - i between -0.1 and 0.6)
 ) as obj 
JOIN PhotoObj as nobj on nobj.objId = obj.neighborObjId 
WHERE 
 nobj.run = obj.run and
 (abs(obj.psfMag_g - nobj.psfMag_g) < 0.5 or
 abs(obj.psfMag_r - nobj.psfMag_r) < 0.5 or
 abs(obj.psfMag_i - nobj.psfMag_i) < 0.5) 

Your query output (max 500,000 rows):

runcamColfieldrowccolcidgrizDnfieldnid
7565 19 748.91386.0110318.30717.62717.39017.264 15191090
7565 19 748.9 264.1134819.92619.01718.69518.576 10191106
7565 171209.4 509.6143920.23319.63819.37419.168 14171436
7565 181175.6 274.5 98418.61518.27018.16418.173 14181211
7565 18 928.61404.7 91418.55817.91717.67417.544 12181184
7565 181380.41214.1105819.75419.09518.81818.672 10181064
7565 181399.41196.1106419.63218.68218.32718.175 10181058
7565 181023.61859.3 92819.06618.17717.85317.694 1318 932
7565 181026.81826.9 93218.92517.99117.68917.519 1318 928
7565 18 347.2 564.3 71517.70516.94616.68716.537 1318 183

Use the button below to upload the results of the above query to the SAS and retrieve the corresponding FITS files:

Upload list of fields to SAS