What is the average First year that has a Notes of replaced by us 12 when i-94 replaced us 12, and a Final year larger than 1961?
CREATE TABLE table_name_31 (first_year INTEGER, notes VARCHAR, final_year VARCHAR)
SELECT AVG(first_year) FROM table_name_31 WHERE notes = "replaced by us 12 when i-94 replaced us 12" AND final_year > 1961
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE table_name_31 (first_year INTEGER, notes VARCHAR, final_year VARCHAR) Question: What is the average First year that has a Notes of replaced by us 12 when i-94 replaced us 12, and a Final year larger than 1961? [/INST] SELECT AVG(first_year) FROM table_name_31 WHERE notes = "replaced by us 12 when i-94 replaced us 12" AND final_year > 1961 </s>