SELECT `p`.`sku` FROM `catalog_product_entity` AS `p`
LEFT JOIN `catalog_product_entity_varchar` AS `attr_images`
ON `attr_images`.`entity_id` = `p`.`entity_id`
AND `attr_images`.`attribute_id` IN (SELECT `attribute_id` FROM `eav_attribute`
WHERE `attribute_code` IN ('image', 'small_image', 'thumbnail') AND `entity_type_id` = 4
)
LEFT JOIN `catalog_product_entity_media_gallery` AS `gallery`
ON `gallery`.`entity_id` = `p`.`entity_id`
WHERE (`attr_images`.`value` IS NULL OR `attr_images`.`value` = 'no_selection') AND (`gallery`.`value` IS NULL);