all posts 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 all lats sorted 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) order by x.post_title all lons sorted