Table: tv_episode_ratings
Columns: series
season
title
directed_by
written_by
original_air_date
total_viewers_in_millions

Question: What is the total number of titles written by Casey Johnson?
SQL: SELECT COUNT("title") FROM tv_episode_ratings WHERE "written_by" = 'Casey Johnson'

Question: Who wrote the title that received 1.211 million total viewers?
SQL: SELECT "written_by" FROM tv_episode_ratings WHERE "total_viewers_in_millions" = '1.211'

Question: Who directed the title that was written by Adam Milch?
SQL: SELECT "directed_by" FROM tv_episode_ratings WHERE "written_by" = 'Adam Milch'

Question: How many millions of total viewers watched series #57?
SQL: SELECT COUNT("total_viewers_in_millions") FROM tv_episode_ratings WHERE "series" = 57

Question: How many millions of total viewers watched season #8?
SQL: SELECT "total_viewers_in_millions" FROM tv_episode_ratings WHERE "season" = 8