Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
What's the average amount of Runs that has 40 innings, and Not outs larger than 6?

### Inputs:
table_name: table, columns: ['Matches', 'Innings', 'Not Outs', 'Runs', 'Average']

### Response:
SELECT AVG Runs FROM table WHERE Innings = 40 AND Not Outs > 6