Use have_posts() with array of post results retrieved by $wpdb->get_results

setup_postdata will let you use loop functions with post results via get_posts.

another option is to use the various filters available to alter WP_Query‘s behavior- posts_join, posts_where, posts_orderby.