Cursos

SELECT SQL_CALC_FOUND_ROWS  wp_posts.ID
					 FROM wp_posts  INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id )
					 WHERE 1=1  AND ( 
  wp_postmeta.meta_key = 'ciclo'
) AND wp_posts.post_type = 'cursos' AND ((wp_posts.post_status = 'publish'))
					 GROUP BY wp_posts.ID
					 ORDER BY wp_postmeta.meta_value+0 ASC
					 LIMIT 0, 12