What is the greatest goals for Curtis Davies if ends is greater than 2012?
CREATE TABLE table_name_9 (goals INTEGER, name VARCHAR, ends VARCHAR)
SELECT MAX(goals) FROM table_name_9 WHERE name = "curtis davies" AND ends > 2012
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE table_name_9 (goals INTEGER, name VARCHAR, ends VARCHAR) Question: What is the greatest goals for Curtis Davies if ends is greater than 2012? [/INST] SELECT MAX(goals) FROM table_name_9 WHERE name = "curtis davies" AND ends > 2012 </s>