Table: ny_undercover_episodes_3
Columns: series
season
title
directed_by
original_air_date
production_code

Question: What is the title of the episode with a production code of K1504?
SQL: SELECT "title" FROM ny_undercover_episodes_3 WHERE "production_code" = 'k1504'

Question: What is the average of the Series #s that were directed by Matthew Penn?
SQL: SELECT AVG("series") FROM ny_undercover_episodes_3 WHERE "directed_by" = 'matthew penn'

Question: How many episodes did Matthew Penn direct before season 22?
SQL: SELECT COUNT("series") FROM ny_undercover_episodes_3 WHERE "season" < 22 AND "directed_by" = 'matthew penn'