-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tom Hughes wrote: | We shouldn't really need to do all that though - we should be able | to achieve the same thing with a simple subquery like this: | | select * from current_way | where id in (select cn.id from current_nodes cn | inner join current_way_nodes cwn | on cn.id = cwn.id | where cn.tile in (....))
Can you not use 2 joins and a group_by? select * from current_way ~ inner join current_nodes cn ~ on current_way.id = cn.id ~ inner join current_way_nodes cwn ~ on cn.id = cwn.id ~ where cn.tile in (....)) ~ group by current_way.id This shouldn't work (you should get errors about mixing group_by and normal fields) but AFAICR, with MySQL only, it does work. Otherwise you can do select max(foo) as foo, max(bar) as bar etc. for all the fields and get the same effect. Robert (Jamie) Munro -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHk0H+z+aYVHdncI0RAnX+AKDxkfur3nK6g/HPrUB0lUFzn5mhAwCgiRrX E4yIMr0ZlJZoq1s4PEJqO3Y= =Q9Mt -----END PGP SIGNATURE----- _______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev

