Abaixo está uma instrução que descreve uma tarefa de geração de SQL, combinada com uma entrada que fornece mais contexto sobre os esquemas de tabela disponíveis. Escreva o código SQL que responda adequadamente à solicitação
 ###Instrução: Quantas Ligas diferentes tiveram uma média de público de 3589?
 ###Tabelas: CREATE TABLE year-by-year (year-by-year_id AUTO_INCREMENT PRIMARY KEY, Year INT, Division INT, League VARCHAR, Regular Season VARCHAR, Playoffs VARCHAR, Open Cup VARCHAR, Avg. Attendance INT) CREATE TABLE low_powered_translators (low_powered_translators_id AUTO_INCREMENT PRIMARY KEY, Call sign VARCHAR, Frequency MHz INT, City of license VARCHAR, ERP W INT, Class VARCHAR, FCC info VARCHAR) CREATE TABLE season_2:_1993-1994 (season_2:_1993-1994_id AUTO_INCREMENT PRIMARY KEY, No. in series INT, No. in season INT, Title VARCHAR, Director VARCHAR, Writer(s) VARCHAR, Original air date VARCHAR, Production code VARCHAR) CREATE TABLE grand_slam_record (grand_slam_record_id AUTO_INCREMENT PRIMARY KEY, Event VARCHAR, 2006–07 VARCHAR, 2009–10 VARCHAR, 2010–11 VARCHAR, 2011–12 VARCHAR, 2012–13 VARCHAR) CREATE TABLE referendum_on_prohibition (referendum_on_prohibition_id AUTO_INCREMENT PRIMARY KEY, Jurisdiction VARCHAR, For Prohibition INT, Percent For VARCHAR, Against Prohibition INT, Percent Against VARCHAR)  
SELECT COUNT League FROM year-by-year WHERE Avg. Attendance = 3589