Task: Text to Code
Input (English): SQL: SELECT Code FROM country WHERE LocalName = "Spanish"
Feedback: Also ensure that countrylanguage's is official equals T .
Output (English): SELECT CountryCode ,  max(Percentage) FROM countrylanguage WHERE LANGUAGE  =  "Spanish" GROUP BY CountryCode