I need your help. I am trying to mass delete attachments from a custom post type ('book') using a sql query. I found this snippet on the wordpress form: Wordpress.org
I tested it on my local computer, and it removes all of the attachments from my media library. Now, I would like to have your help in setting the query so that it will only target attachments(featured image and thumbnail) from my custom post type 'book'.