select distinct a.post_title from wp_posts a, wp_term_relationships b, wp_term_taxonomy c where a.post_status = 'publish' && a.ID = b.object_id && b.term_taxonomy_id in (select term_taxonomy_id from wp_term_taxonomy where parent = 60) order by a.post_title asc SELECT distinct x.ID, x.post_title, y.meta_value FROM wp_posts x, wp_postmeta y WHERE y.meta_key = 'lat' && x.ID = y.post_id && x.ID in (select distinct a.ID from wp_posts a, wp_term_relationships b, wp_term_taxonomy c where a.post_status = 'publish' && a.ID = b.object_id && b.term_taxonomy_id in (select term_taxonomy_id from wp_term_taxonomy where parent = 60) order by a.post_title asc) SELECT distinct x.ID, x.post_title, y.meta_value FROM wp_posts x, wp_postmeta y WHERE y.meta_key = 'lat' && x.ID = y.post_id && x.ID in (select distinct a.ID from wp_posts a, wp_term_relationships b, wp_term_taxonomy c where a.post_status = 'publish' && a.ID = b.object_id && b.term_taxonomy_id in (select term_taxonomy_id from wp_term_taxonomy where parent = 60) order by a.post_title asc) inner join ( SELECT distinct m.ID, n.meta_value FROM wp_posts m, wp_postmeta n WHERE y.meta_key = 'lon' && x.ID = y.post_id && x.ID in (select distinct a.ID from wp_posts a, wp_term_relationships b, wp_term_taxonomy c where a.post_status = 'publish' && a.ID = b.object_id && b.term_taxonomy_id in (select term_taxonomy_id from wp_term_taxonomy where parent = 60) order by a.post_title asc) ) m ON m.ID = x.ID