SELECT
wp_posts.*
FROM
wp_posts
INNER JOIN
wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id)
WHERE
wp_posts.post_type = 'attachment'
AND
((wp_posts.post_status = 'inherit'))
AND
((wp_postmeta.meta_key = '_wp_attachment_is_custom_header' AND CAST(wp_postmeta.meta_value AS CHAR) = 'infax_2016_bootstrap'))
GROUP BY
wp_posts.ID
Array
(
)
#######