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

### Instruction:
What is the average value for 2005, when the value for 2008 is greater than 0, when the value for 2007 is greater than 310, when the Average annual is 767, and when the Total is greater than 4,597?

### Inputs:
table_name: table, columns: ['2005', '2006', '2007', '2008', '2009', '2010', 'Total', 'Average annual']

### Response:
SELECT AVG 2005 FROM table WHERE 2008 > 0 AND 2007 > 310 AND Average annual = 767 AND Total > 4,597