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 director, what are the titles and ratings for all the movies they reviewed? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | 

### Response:

select _ , max ( _ ) from _ where _ group by _ | select movie.title , rating.stars , movie.director , max ( rating.stars ) from rating join movie on rating.mid = movie.mid where director != 'null' group by director