Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:

Convert text to sql: For each movie that received more than 3 reviews, what is the average rating? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ , avg ( _ ) from _ group by _ having count ( _ ) >= _ | select mid , avg ( stars ) from rating group by mid having count ( * ) >= 2