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: Se o tipo espectral for g1v, qual é a quantidade total de distância?
 ###Tabelas: CREATE TABLE targets (targets_id AUTO_INCREMENT PRIMARY KEY, HD designation VARCHAR, Constellation VARCHAR, Distance ( ly ) VARCHAR, Spectral type VARCHAR, Signal power ( kW ) INT, Date sent VARCHAR, Arrival date VARCHAR) CREATE TABLE east_german_championship (east_german_championship_id AUTO_INCREMENT PRIMARY KEY, Race Name VARCHAR, Circuit VARCHAR, Date VARCHAR, Winning driver VARCHAR, Constructor VARCHAR, Report VARCHAR) CREATE TABLE composition_of_the_7th_seanad (composition_of_the_7th_seanad_id AUTO_INCREMENT PRIMARY KEY, Administrative Panel INT, Agricultural Panel INT, Cultural and Educational Panel INT, Industrial and Commercial Panel INT, Labour Panel INT, National University of Ireland INT, University of Dublin INT, Nominated by the Taoiseach INT, Total INT) CREATE TABLE wnit_player_stats (wnit_player_stats_id AUTO_INCREMENT PRIMARY KEY, Player VARCHAR, Games Played INT, Minutes INT, Field Goals INT, Three Pointers INT, Free Throws INT, Rebounds INT, Assists INT, Blocks INT, Steals INT, Points INT) CREATE TABLE match_log_and_statistics (match_log_and_statistics_id AUTO_INCREMENT PRIMARY KEY, Player VARCHAR, Matches INT, Innings INT, Wickets INT, Average VARCHAR, BBI VARCHAR, BBM VARCHAR, 5wi INT)  
SELECT COUNT Distance ( ly ) FROM targets WHERE Spectral type = G1V