meta_query where the meta value is not the post title

I found a solution that works (thanks Steve), hopefully somebody will find this useful in the future $sql = “SELECT p.ID FROM wp_posts AS p WHERE post_parent = $post->ID AND post_type=”post_type” AND ID IN ( SELECT post_id FROM wp_postmeta AS pm WHERE pm.meta_key = ‘my_acf_key’ AND pm.meta_value = p.post_title );”; $idList = $wpdb->get_col( $sql );