What is average life expectancy in the countries where English is not the official language?
CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR, IsOfficial VARCHAR); CREATE TABLE country (LifeExpectancy INTEGER, Name VARCHAR); CREATE TABLE country (Name VARCHAR, Code VARCHAR)
SELECT AVG(LifeExpectancy) FROM country WHERE NOT Name IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" AND T2.IsOfficial = "T")
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR, IsOfficial VARCHAR); CREATE TABLE country (LifeExpectancy INTEGER, Name VARCHAR); CREATE TABLE country (Name VARCHAR, Code VARCHAR) Question: What is average life expectancy in the countries where English is not the official language? [/INST] SELECT AVG(LifeExpectancy) FROM country WHERE NOT Name IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" AND T2.IsOfficial = "T") </s>