user: ### NOW ANSWER:
Question: Name who wrote the episode directed by Patrick Duffy airing on November 7, 1997
Columns: ['No. in series', 'No. in season', 'Title', 'Directed by', 'Written by', 'Original air date', 'Production code']
Types: ['real', 'real', 'text', 'text', 'text', 'text', 'real']
Sample row: [142.0, 1.0, '"Making the Grade"', 'Patrick Duffy', 'Adam Markowitz', 'September 19, 1997', 466501.0]
SQL:

assistant: SELECT "Written by" FROM "Table" WHERE "Directed by" = 'Patrick Duffy' AND "Original air date" = 'November 7, 1997';