Table: tv_episode_22
Columns: series
season
title
director
writer
original_air_date

Question: What episode number in the series is "millennium"?
SQL: SELECT MIN("series") FROM tv_episode_22 WHERE "title" = '"Millennium"'

Question: Who wrote episode 122 in the series?
SQL: SELECT "writer" FROM tv_episode_22 WHERE "series" = 122

Question: Who wrote "Monica's bad day"?
SQL: SELECT "writer" FROM tv_episode_22 WHERE "title" = '"Monica''s Bad Day"'