system: You are a text-to-SQL generator. Given a database schema and a question, reply with a single valid SQLite query that answers it. Output only the SQL on one line, with no explanation and no markdown.

user: Schema:
CREATE TABLE institution_details (
  unitid integer PRIMARY KEY,
  chronname text,
  city text,
  state text,
  level text,
  control text,
  basic text,
  hbcu text,
  flagship text,
  long_x real,
  lat_y real,
  site text,
  student_count integer,
  awards_per_value real,
  awards_per_state_value real,
  awards_per_natl_value real,
  exp_award_value integer,
  exp_award_state_value integer,
  exp_award_natl_value integer,
  exp_award_percentile integer,
  ft_pct real,
  fte_value integer,
  fte_percentile integer,
  med_sat_value text,
  med_sat_percentile text,
  aid_value integer,
  aid_percentile integer,
  endow_value text,
  endow_percentile text,
  grad_100_value real,
  grad_100_percentile integer,
  grad_150_value real,
  grad_150_percentile integer,
  pell_value real,
  pell_percentile integer,
  retain_value real,
  retain_percentile integer,
  ft_fac_value real,
  ft_fac_percentile integer,
  vsa_year text,
  vsa_grad_after4_first text,
  vsa_grad_elsewhere_after4_first text,
  vsa_enroll_after4_first text,
  vsa_enroll_elsewhere_after4_first text,
  vsa_grad_after6_first text,
  vsa_grad_elsewhere_after6_first text,
  vsa_enroll_after6_first text,
  vsa_enroll_elsewhere_after6_first text,
  vsa_grad_after4_transfer text,
  vsa_grad_elsewhere_after4_transfer text,
  vsa_enroll_after4_transfer text,
  vsa_enroll_elsewhere_after4_transfer text,
  vsa_grad_after6_transfer text,
  vsa_grad_elsewhere_after6_transfer text,
  vsa_enroll_after6_transfer text,
  vsa_enroll_elsewhere_after6_transfer text,
  similar text,
  state_sector_ct integer,
  carnegie_ct integer,
  counted_pct text,
  nicknames text,
  cohort_size integer
);
CREATE TABLE institution_grads (
  unitid integer,
  year integer,
  gender text,
  race text,
  cohort text,
  grad_cohort text,
  grad_100 text,
  grad_150 text,
  grad_100_rate text,
  grad_150_rate text
);
CREATE TABLE state_sector_grads (
  stateid integer,
  state text,
  state_abbr text,
  control text,
  level text,
  year integer,
  gender text,
  race text,
  cohort text,
  grad_cohort text,
  grad_100 text,
  grad_150 text,
  grad_100_rate text,
  grad_150_rate text,
  grad_cohort_ct integer
);
CREATE TABLE state_sector_details (
  stateid integer PRIMARY KEY,
  state text,
  state_post text,
  level text PRIMARY KEY,
  control text PRIMARY KEY,
  schools_count integer,
  counted_pct text,
  awards_per_state_value text,
  awards_per_natl_value real,
  exp_award_state_value text,
  exp_award_natl_value integer,
  state_appr_value text,
  state_appr_rank text,
  grad_rate_rank text,
  awards_per_rank text
);
-- foreign keys: institution_grads.unitid -> institution_details.unitid; state_sector_grads.stateid -> state_sector_details.stateid; state_sector_grads.state -> institution_details.state; state_sector_details.state -> institution_details.state

Hint: Yale University refers to chronname = 'Yale University'; average = DIVIDE(COUNT(race = 'B' WHERE cohort = '4y bach AND year BETWEEN 2002 AND 2005), 3); Black refers to race = 'B'; bachelor's/equivalent-seeking cohort at 4-year institutions refers to cohort = '4y bach'; between 2002 to 2005 refers to year BETWEEN '2002' AND '2005';

Question: In Yale University, what is the average number of Black students per year who were bachelor's/equivalent-seeking cohort at 4-year institutions between 2002 to 2005?

assistant: SELECT AVG(T2.grad_cohort) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.chronname = 'Yale University' AND T2.year BETWEEN 2002 AND 2005 AND T2.race = 'B' AND T2.cohort = '4y bach'