Tuesday, September 17, 2013

SQLITE: nested query

SELECT r.califa_id, u.isoA, g.isoA, r.isoA, i.isoA FROM gc2_r_sky as r, gc2_u_sky as u, gc2_g_sky as g, gc2_i_sky as i where r.califa_id = u.califa_id and r.califa_id = g.califa_id and r.califa_id = i.califa_id and r.califa_id in (select r.califa_id from gc2_r_sky as r order by r.isoA desc limit 10) order by r.isoA desc

No comments:

Post a Comment