I know this topic has been around for 6 months, but it seems that there has never been an answer. I just ran into the same problem as the original author of the problem. So, this is my last SQL query that I found to work and return the desired result:
SELECT SQL_CALC_FOUND_ROWS * FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) LEFT JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id AND mt1.meta_key = 'showPostInBanner' AND mt1.meta_value='1') LEFT JOIN wp_postmeta AS mt2 ON (wp_posts.ID = mt2.post_id) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (34,47,51,50,68,78,82,90,97,155,227,253,285,294,314,373,425,436,452,456,521,627,667,680,694,710,730,741,751) ) AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') GROUP BY wp_posts.ID ORDER BY mt1.meta_value+0 DESC, wp_posts.post_date DESC LIMIT 0, 4
Based on this (my request was trying to get a slightly different result), your request should look like it would work (if I did not include any new errors, but my request definitely works now):
SELECT SQL_CALC_FOUND_ROWS * FROM wp_posts LEFT JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id AND mt1.meta_key = 'showPostInBanner' AND mt1.meta_value='1') LEFT JOIN wp_postmeta AS mt2 ON (wp_posts.ID = mt2.post_id) WHERE 1=1 AND (( (wp_posts.post_title LIKE '%lorem%') OR (wp_posts.post_content LIKE '%lorem%') )) AND AND wp_posts.post_type IN ('post', 'page', 'attachment', 'items', 'locations') AND (wp_posts.post_status = 'publish' OR wp_posts.post_author = 1 AND wp_posts.post_status = 'private') GROUP BY wp_posts.ID ORDER BY mt1.meta_value+0 DESC, wp_posts.post_date DESC LIMIT 0, 6