-- Find CVs using colors. 
-- Search for Cataclysmic Variables and pre-CVs with White Dwarfs and
-- very late secondaries. Just uses some simple color cuts from Paula Szkody.
-- Another simple query that uses math in the WHERE clause

SELECT TOP 10000 run,         
  camCol,
  rerun,
  field,
  objID,
  u, g, r, i, z,
  ra, dec   		-- Just get some basic quantities
FROM PhotoPrimary	-- From all primary detections, regardless of class
WHERE  u - g < 0.4
  and  g - r < 0.7
  and  r - i > 0.4 
  and  i - z > 0.4   	-- that meet the color criteria
