SELECT name, count(*) as count FROM (SELECT left(post_name, 50) AS name FROM wp_posts where post_type = 'attachment') AS t1 group by name having count(*) > 10 order by 2 desc

Attachment Name # Records Products
xymphony-salvin-dental-specialties-product-image-244at least one of these attachments is not used as a photo or in a gallery so don't delete any.
xymphony-salvin-dental-specialties-product-image-344at least one of these attachments is not used as a photo or in a gallery so don't delete any.
xymphony-salvin-dental-specialties-product-image-444at least one of these attachments is not used as a photo or in a gallery so don't delete any.
xymphony-salvin-dental-specialties-product-image-544at least one of these attachments is not used as a photo or in a gallery so don't delete any.
xymphony-salvin-dental-specialties-product-image-644at least one of these attachments is not used as a photo or in a gallery so don't delete any.
xymphony-salvin-dental-specialties-product-image-744at least one of these attachments is not used as a photo or in a gallery so don't delete any.
xymphony-salvin-dental-specialties-product-image-844at least one of these attachments is not used as a photo or in a gallery so don't delete any.
xymphony-salvin-dental-specialties-product-image-944at least one of these attachments is not used as a photo or in a gallery so don't delete any.
allo-0-5-salvin-dental-specialties-product-image-111at least one of these attachments is not used as a photo or in a gallery so don't delete any.