-- Getting a subsample of the data.
-- Uses the integer short object id (obj) and the '%' syntax (like awk) 
-- to get every 100th object. THIS IS NOT A TRULY RANDOM SUBSET!

SELECT u, g, r, i, z 
FROM Galaxy 
WHERE (obj %100 ) = 1 and r<21
