SELECT * FROM szq6x_postmeta pm LEFT JOIN szq6x_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL;
DELETE pm FROM szq6x_postmeta pm LEFT JOIN szq6x_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL;