user: ### NOW ANSWER:
Question: What episode was written by Matt MacLennan?
Columns: ['Total #', 'Episode #', 'Title', 'Directed by', 'Written by', 'Original air date']
Types: ['real', 'real', 'text', 'text', 'text', 'text']
Sample row: [27.0, 1.0, '"Fuck City Hall"', 'Scott Smith', 'Sheri Elwood', 'September23,2012']
SQL:

assistant: SELECT MAX("Episode #") FROM "Table" WHERE "Written by" = 'Matt MacLennan';