SQL to run below (change table name to your prefix)


DELETE from ulj_users where ulj_users.ID not in (
	SELECT meta_value FROM ulj_postmeta WHERE meta_key = '_customer_user'
) AND ulj_users.ID not in (
	select distinct(post_author) from ulj_posts
)LIMIT 100;

delete from ulj_usermeta where ulj_usermeta.user_id not in (select ID from ulj_users)
LIMIT 100;