DELETE FROM nwfa_wc_product_meta_lookup WHERE product_id IN (SELECT ID FROM nwfa_posts WHERE post_status = "trash"); DELETE FROM nwfa_postmeta WHERE post_id IN (SELECT ID FROM nwfa_posts WHERE post_status = "trash"); DELETE FROM nwfa_posts WHERE post_status = "trash";