I would like to change the author name of all the posts I have in Wordpress (+1000 articles). Currently I have the same author for all posts (Johnny user, your id=1). The thing is that I would like to run a MySQL query to randomly change the author of the post to another user. Currently I have 10 users that I would like to put as authors of the posts, randomly, in such a way that each one should be as the author of about 100 posts.
I know I can change all the authors like this, but it is far from what I want to achieve:
UPDATE wp_posts SET post_author='2' WHERE post_author='1';