script to convert ratings in database to new distribution