SELECT objectId,jd,ra,decl,fid,magpsf FROM candidates WHERE jd BETWEEN 2458822.411204 and 2458824.411204 AND
((ra BETWEEN 345.0 and 350.0 AND decl BETWEEN 20.0 AND 25.0)
OR (ra BETWEEN 350.0 and 355.0 AND decl BETWEEN 20.0 AND 25.0)
OR (ra BETWEEN 355.0 and 360.0 AND decl BETWEEN 20.0 AND 25.0)
OR (ra BETWEEN 340.0 and 345.0 AND decl BETWEEN 20.0 AND 25.0)
OR (ra BETWEEN 340.0 and 345.0 AND decl BETWEEN 15.0 AND 20.0)
OR (ra BETWEEN 345.0 and 350.0 AND decl BETWEEN 15.0 AND 20.0)
OR (ra BETWEEN 350.0 and 355.0 AND decl BETWEEN 15.0 AND 20.0)
OR (ra BETWEEN 355.0 and 360.0 AND decl BETWEEN 15.0 AND 20.0)
OR (ra BETWEEN 0.0 and 5.0 AND decl BETWEEN 15.0 AND 20.0)
OR (ra BETWEEN 335.0 and 340.0 AND decl BETWEEN 15.0 AND 20.0)
OR (ra BETWEEN 0.0 and 5.0 AND decl BETWEEN 10.0 AND 15.0)
OR (ra BETWEEN 335.0 and 340.0 AND decl BETWEEN 10.0 AND 15.0)
OR (ra BETWEEN 340.0 and 345.0 AND decl BETWEEN 10.0 AND 15.0)
OR (ra BETWEEN 345.0 and 350.0 AND decl BETWEEN 10.0 AND 15.0)
OR (ra BETWEEN 350.0 and 355.0 AND decl BETWEEN 10.0 AND 15.0)
OR (ra BETWEEN 355.0 and 360.0 AND decl BETWEEN 10.0 AND 15.0)
OR (ra BETWEEN 165.0 and 170.0 AND decl BETWEEN 10.0 AND 15.0)
OR (ra BETWEEN 170.0 and 175.0 AND decl BETWEEN 10.0 AND 15.0)
OR (ra BETWEEN 5.0 and 10.0 AND decl BETWEEN 10.0 AND 15.0)
OR (ra BETWEEN 160.0 and 165.0 AND decl BETWEEN 10.0 AND 15.0)
OR (ra BETWEEN 155.0 and 160.0 AND decl BETWEEN 10.0 AND 15.0)
OR (ra BETWEEN 0.0 and 5.0 AND decl BETWEEN 5.0 AND 10.0)
OR (ra BETWEEN 5.0 and 10.0 AND decl BETWEEN 5.0 AND 10.0)
OR (ra BETWEEN 155.0 and 160.0 AND decl BETWEEN 5.0 AND 10.0)
OR (ra BETWEEN 160.0 and 165.0 AND decl BETWEEN 5.0 AND 10.0)
OR (ra BETWEEN 165.0 and 170.0 AND decl BETWEEN 5.0 AND 10.0)
OR (ra BETWEEN 170.0 and 175.0 AND decl BETWEEN 5.0 AND 10.0)
OR (ra BETWEEN 335.0 and 340.0 AND decl BETWEEN 5.0 AND 10.0)
OR (ra BETWEEN 340.0 and 345.0 AND decl BETWEEN 5.0 AND 10.0)
OR (ra BETWEEN 345.0 and 350.0 AND decl BETWEEN 5.0 AND 10.0)
OR (ra BETWEEN 350.0 and 355.0 AND decl BETWEEN 5.0 AND 10.0)
OR (ra BETWEEN 355.0 and 360.0 AND decl BETWEEN 5.0 AND 10.0)
OR (ra BETWEEN 175.0 and 180.0 AND decl BETWEEN 5.0 AND 10.0)
OR (ra BETWEEN 330.0 and 335.0 AND decl BETWEEN 5.0 AND 10.0)
OR (ra BETWEEN 0.0 and 5.0 AND decl BETWEEN 0.0 AND 5.0)
OR (ra BETWEEN 5.0 and 10.0 AND decl BETWEEN 0.0 AND 5.0)
OR (ra BETWEEN 155.0 and 160.0 AND decl BETWEEN 0.0 AND 5.0)
OR (ra BETWEEN 160.0 and 165.0 AND decl BETWEEN 0.0 AND 5.0)
OR (ra BETWEEN 165.0 and 170.0 AND decl BETWEEN 0.0 AND 5.0)
OR (ra BETWEEN 170.0 and 175.0 AND decl BETWEEN 0.0 AND 5.0)
OR (ra BETWEEN 175.0 and 180.0 AND decl BETWEEN 0.0 AND 5.0)
OR (ra BETWEEN 330.0 and 335.0 AND decl BETWEEN 0.0 AND 5.0)
OR (ra BETWEEN 335.0 and 340.0 AND decl BETWEEN 0.0 AND 5.0)
OR (ra BETWEEN 340.0 and 345.0 AND decl BETWEEN 0.0 AND 5.0)
OR (ra BETWEEN 345.0 and 350.0 AND decl BETWEEN 0.0 AND 5.0)
OR (ra BETWEEN 350.0 and 355.0 AND decl BETWEEN 0.0 AND 5.0)
OR (ra BETWEEN 355.0 and 360.0 AND decl BETWEEN 0.0 AND 5.0)
OR (ra BETWEEN 325.0 and 330.0 AND decl BETWEEN 0.0 AND 5.0)
OR (ra BETWEEN 320.0 and 325.0 AND decl BETWEEN 0.0 AND 5.0)
OR (ra BETWEEN 0.0 and 5.0 AND decl BETWEEN -5.0 AND 0.0)
OR (ra BETWEEN 5.0 and 10.0 AND decl BETWEEN -5.0 AND 0.0)
OR (ra BETWEEN 160.0 and 165.0 AND decl BETWEEN -5.0 AND 0.0)
OR (ra BETWEEN 165.0 and 170.0 AND decl BETWEEN -5.0 AND 0.0)
OR (ra BETWEEN 170.0 and 175.0 AND decl BETWEEN -5.0 AND 0.0)
OR (ra BETWEEN 175.0 and 180.0 AND decl BETWEEN -5.0 AND 0.0)
OR (ra BETWEEN 320.0 and 325.0 AND decl BETWEEN -5.0 AND 0.0)
OR (ra BETWEEN 325.0 and 330.0 AND decl BETWEEN -5.0 AND 0.0)
OR (ra BETWEEN 330.0 and 335.0 AND decl BETWEEN -5.0 AND 0.0)
OR (ra BETWEEN 335.0 and 340.0 AND decl BETWEEN -5.0 AND 0.0)
OR (ra BETWEEN 340.0 and 345.0 AND decl BETWEEN -5.0 AND 0.0)
OR (ra BETWEEN 345.0 and 350.0 AND decl BETWEEN -5.0 AND 0.0)
OR (ra BETWEEN 350.0 and 355.0 AND decl BETWEEN -5.0 AND 0.0)
OR (ra BETWEEN 355.0 and 360.0 AND decl BETWEEN -5.0 AND 0.0)
OR (ra BETWEEN 190.0 and 195.0 AND decl BETWEEN -5.0 AND 0.0)
OR (ra BETWEEN 185.0 and 190.0 AND decl BETWEEN -5.0 AND 0.0)
OR (ra BETWEEN 195.0 and 200.0 AND decl BETWEEN -5.0 AND 0.0)
OR (ra BETWEEN 0.0 and 5.0 AND decl BETWEEN -10.0 AND -5.0)
OR (ra BETWEEN 5.0 and 10.0 AND decl BETWEEN -10.0 AND -5.0)
OR (ra BETWEEN 160.0 and 165.0 AND decl BETWEEN -10.0 AND -5.0)
OR (ra BETWEEN 165.0 and 170.0 AND decl BETWEEN -10.0 AND -5.0)
OR (ra BETWEEN 170.0 and 175.0 AND decl BETWEEN -10.0 AND -5.0)
OR (ra BETWEEN 175.0 and 180.0 AND decl BETWEEN -10.0 AND -5.0)
OR (ra BETWEEN 185.0 and 190.0 AND decl BETWEEN -10.0 AND -5.0)
OR (ra BETWEEN 190.0 and 195.0 AND decl BETWEEN -10.0 AND -5.0)
OR (ra BETWEEN 195.0 and 200.0 AND decl BETWEEN -10.0 AND -5.0)
OR (ra BETWEEN 320.0 and 325.0 AND decl BETWEEN -10.0 AND -5.0)
OR (ra BETWEEN 325.0 and 330.0 AND decl BETWEEN -10.0 AND -5.0)
OR (ra BETWEEN 330.0 and 335.0 AND decl BETWEEN -10.0 AND -5.0)
OR (ra BETWEEN 335.0 and 340.0 AND decl BETWEEN -10.0 AND -5.0)
OR (ra BETWEEN 340.0 and 345.0 AND decl BETWEEN -10.0 AND -5.0)
OR (ra BETWEEN 345.0 and 350.0 AND decl BETWEEN -10.0 AND -5.0)
OR (ra BETWEEN 350.0 and 355.0 AND decl BETWEEN -10.0 AND -5.0)
OR (ra BETWEEN 355.0 and 360.0 AND decl BETWEEN -10.0 AND -5.0)
OR (ra BETWEEN 315.0 and 320.0 AND decl BETWEEN -10.0 AND -5.0)
OR (ra BETWEEN 0.0 and 5.0 AND decl BETWEEN -15.0 AND -10.0)
OR (ra BETWEEN 185.0 and 190.0 AND decl BETWEEN -15.0 AND -10.0)
OR (ra BETWEEN 190.0 and 195.0 AND decl BETWEEN -15.0 AND -10.0)
OR (ra BETWEEN 195.0 and 200.0 AND decl BETWEEN -15.0 AND -10.0)
OR (ra BETWEEN 315.0 and 320.0 AND decl BETWEEN -15.0 AND -10.0)
OR (ra BETWEEN 320.0 and 325.0 AND decl BETWEEN -15.0 AND -10.0)
OR (ra BETWEEN 325.0 and 330.0 AND decl BETWEEN -15.0 AND -10.0)
OR (ra BETWEEN 330.0 and 335.0 AND decl BETWEEN -15.0 AND -10.0)
OR (ra BETWEEN 335.0 and 340.0 AND decl BETWEEN -15.0 AND -10.0)
OR (ra BETWEEN 340.0 and 345.0 AND decl BETWEEN -15.0 AND -10.0)
OR (ra BETWEEN 345.0 and 350.0 AND decl BETWEEN -15.0 AND -10.0)
OR (ra BETWEEN 350.0 and 355.0 AND decl BETWEEN -15.0 AND -10.0)
OR (ra BETWEEN 355.0 and 360.0 AND decl BETWEEN -15.0 AND -10.0)
OR (ra BETWEEN 5.0 and 10.0 AND decl BETWEEN -15.0 AND -10.0)
OR (ra BETWEEN 0.0 and 5.0 AND decl BETWEEN -20.0 AND -15.0)
OR (ra BETWEEN 320.0 and 325.0 AND decl BETWEEN -20.0 AND -15.0)
OR (ra BETWEEN 325.0 and 330.0 AND decl BETWEEN -20.0 AND -15.0)
OR (ra BETWEEN 330.0 and 335.0 AND decl BETWEEN -20.0 AND -15.0)
OR (ra BETWEEN 335.0 and 340.0 AND decl BETWEEN -20.0 AND -15.0)
OR (ra BETWEEN 340.0 and 345.0 AND decl BETWEEN -20.0 AND -15.0)
OR (ra BETWEEN 345.0 and 350.0 AND decl BETWEEN -20.0 AND -15.0)
OR (ra BETWEEN 350.0 and 355.0 AND decl BETWEEN -20.0 AND -15.0)
OR (ra BETWEEN 355.0 and 360.0 AND decl BETWEEN -20.0 AND -15.0)
OR (ra BETWEEN 315.0 and 320.0 AND decl BETWEEN -20.0 AND -15.0)
OR (ra BETWEEN 320.0 and 325.0 AND decl BETWEEN -25.0 AND -20.0)
OR (ra BETWEEN 325.0 and 330.0 AND decl BETWEEN -25.0 AND -20.0)
OR (ra BETWEEN 330.0 and 335.0 AND decl BETWEEN -25.0 AND -20.0)
OR (ra BETWEEN 335.0 and 340.0 AND decl BETWEEN -25.0 AND -20.0)
OR (ra BETWEEN 340.0 and 345.0 AND decl BETWEEN -25.0 AND -20.0)
OR (ra BETWEEN 325.0 and 330.0 AND decl BETWEEN -30.0 AND -25.0)
OR (ra BETWEEN 330.0 and 335.0 AND decl BETWEEN -30.0 AND -25.0)
OR (ra BETWEEN 335.0 and 340.0 AND decl BETWEEN -30.0 AND -25.0)
) ORDER BY objectId