Hi Pat and colleagues!
On Wed, 2008-05-14 at 11:37 -0700, Patrick Dowler wrote:
> Recognizing that this is a spatial join of s1 (all observed objects)
> with s2 (the observed objects with the specified properties), the
> intent can be expressed as:
>
> select
> s1.csys, s1.obsra, s1.obsdec, s1.z, s1.specid, s1.targetname,
> s1.quality
> from
> spectra as s1 JOIN spectra as s2 ON INTERSECTS(
> POINT(s1.csys, s1.obsra, s1.obsdec)
> CIRCLE(s2.csys,s2.obsra, s2.obsdec, 0.001) ) = 1
> where
> s2.quality > 3 and s2.redshift > 1.6
>
I think this is an elegant solution. There were some minor typos, so if it is used, this is syntactically correct (it went through the parser):
Regards
Jeff
-- Jeff Lusted tel: +44 (0)116 252 3581 Astrogrid Project mob: +44 (0)7973 492290 Dept Physics & Astronomy email: jl99-at-star.le.ac.uk University of Leicester web: http://www.astrogrid.orgReceived on 2008-05-15Z13:18:17