SELECT title FROM movie
inner join moviecomment on movie.id = moviecomment.filmid
inner join comment on movecomment.commentid = comment.id
WHERE movie.id = @MovieID;
I do not know how you are passing the movie id so I assumed a variable.
--"Given is a MovieId,"
DECLARE @MovieId int
SET @MovieId = 23
--"I want to find all movies which has the same score as the movieId which has given."
--To do that, we first have to find the score for the given MovieId. Since there
--could be more than one score for a movie, I've chosen to use the highest score; you
--could instead use the low score or avg score or most recent score just as easily.
DECLARE @score_to_match int
SELECT @score_to_match = MAX(c.Score) /* or MIN() or AVG() */
FROM Movie m
INNER JOIN MovieComment mc ON mc.FilmId = m.Id
INNER JOIN Comment c ON c.Id = mc.CommentId
WHERE m.Id = @MovieId
--Now we list all movies that received the same score. You could instead list
--movies that had the same high, low, avg or most recent score if you prefer.
SELECT DISTINCT m.*
FROM Movie m
INNER JOIN MovieComment mc ON mc.FilmId = m.Id
INNER JOIN Comment c ON c.Id = mc.CommentId
WHERE c.Score = @score_to_match AND
m.Id <> @MovieId /*don't list the given movie as "matching" itself!*/