movies, rating and tags are tables or databases?! And from where are you getting the user names?! At least put your DB structure. But as I see, you'll need more than one query here:
1- Get user name...