db_id
stringlengths
4
31
text
stringlengths
370
4.84k
baseball_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the total number of games the team Boston Red Stockings attended from 1990 to 2000. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | ### Response: select sum ( home_game.games ) from home_game join team on home_game.team_id = team.team_id_br where team.name = 'Boston Red Stockings' and home_game.year between 1990 and 2000
baseball_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which team had the least number of attendances in home games in 1980? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | ### Response: select team.name from home_game join team on home_game.team_id = team.team_id_br where home_game.year = 1980 order by home_game.attendance asc limit 1
baseball_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the team that attended the least number of home games in 1980. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | ### Response: select team.name from home_game join team on home_game.team_id = team.team_id_br where home_game.year = 1980 order by home_game.attendance asc limit 1
baseball_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names of states that have more than 2 parks. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | ### Response: select state from park group by state having count ( * ) > 2
baseball_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which states have more than 2 parks? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | ### Response: select state from park group by state having count ( * ) > 2
baseball_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many team franchises are active, with active value 'Y'? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | ### Response: select count ( * ) from team_franchise where active = 'Y'
baseball_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the number of team franchises that are active (have 'Y' as "active" information). | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | ### Response: select count ( * ) from team_franchise where active = 'Y'
baseball_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which cities have 2 to 4 parks? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | ### Response: select city from park group by city having count ( * ) between 2 and 4
baseball_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find all the cities that have 2 to 4 parks. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | ### Response: select city from park group by city having count ( * ) between 2 and 4
baseball_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which park had most attendances in 2008? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | ### Response: select park.park_name from home_game join park on home_game.park_id = park.park_id where home_game.year = 2008 order by home_game.attendance desc limit 1
baseball_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which park did the most people attend in 2008? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | ### Response: select park.park_name from home_game join park on home_game.park_id = park.park_id where home_game.year = 2008 order by home_game.attendance desc limit 1
mountain_photos
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many camera lenses have a focal length longer than 15 mm? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | ### Response: select count ( * ) from camera_lens where focal_length_mm > 15
mountain_photos
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the brand and name for each camera lens, and sort in descending order of maximum aperture. | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | ### Response: select brand , name from camera_lens order by max_aperture desc
mountain_photos
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the id, color scheme, and name for all the photos. | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | ### Response: select id , color , name from photos
mountain_photos
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the maximum and average height of the mountains? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | ### Response: select max ( height ) , avg ( height ) from mountain
mountain_photos
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the average prominence of the mountains in country 'Morocco'? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | ### Response: select avg ( prominence ) from mountain where country = 'Morocco'
mountain_photos
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | ### Response: select name , height , prominence from mountain where range != 'Aberdare Range'
mountain_photos
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the id and name of the photos for mountains? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | ### Response: select mountain.id , mountain.name from mountain join photos on mountain.id = photos.mountain_id where mountain.height > 4000
mountain_photos
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the id and name of the mountains that have at least 2 photos? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | ### Response: select mountain.id , mountain.name from mountain join photos on mountain.id = photos.mountain_id group by mountain.id having count ( * ) >= 2
mountain_photos
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of the cameras that have taken picture of the most mountains? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | ### Response: select camera_lens.name from photos join camera_lens on photos.camera_lens_id = camera_lens.id group by camera_lens.id order by count ( * ) desc limit 1
mountain_photos
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | ### Response: select camera_lens.name from camera_lens join photos on photos.camera_lens_id = camera_lens.id where camera_lens.brand = 'Sigma' or camera_lens.brand = 'Olympus'
mountain_photos
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many different kinds of lens brands are there? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | ### Response: select count ( distinct brand ) from camera_lens
mountain_photos
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many camera lenses are not used in taking any photos? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | ### Response: select count ( * ) from camera_lens where id not in ( select camera_lens_id from photos )
mountain_photos
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | ### Response: select count ( distinct photos.camera_lens_id ) from mountain join photos on mountain.id = photos.mountain_id where mountain.country = 'Ethiopia'
mountain_photos
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the brands of lenses that took both a picture of mountains with range 'Toubkal Atlas' and a picture of mountains with range 'Lasta Massif' | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | ### Response: select camera_lens.brand from mountain join photos on mountain.id = photos.mountain_id join camera_lens on photos.camera_lens_id = camera_lens.id where mountain.range = 'Toubkal Atlas' intersect select camera_lens.brand from mountain join photos on mountain.id = photos.mountain_id join camera_lens on photos.camera_lens_id = camera_lens.id where mountain.range = 'Lasta Massif'
mountain_photos
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'. | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | ### Response: select name , prominence from mountain except select mountain.name , mountain.prominence from mountain join photos on mountain.id = photos.mountain_id join camera_lens on photos.camera_lens_id = camera_lens.id where camera_lens.brand = 'Sigma'
mountain_photos
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the camera lens names containing substring "Digital". | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | ### Response: select name from camera_lens where name like '%Digital%'
mountain_photos
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos. | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | ### Response: select camera_lens.name , count ( * ) from camera_lens join photos on camera_lens.id = photos.camera_lens_id group by camera_lens.id order by count ( * ) asc
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the names of channels that are not owned by CCTV. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select name from channel where owner != 'CCTV'
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which channels are not owned by CCTV? Give me the channel names. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select name from channel where owner != 'CCTV'
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List all channel names ordered by their rating in percent from big to small. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select name from channel order by rating_in_percent desc
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Give me a list of all the channel names sorted by the channel rating in descending order. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select name from channel order by rating_in_percent desc
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the owner of the channel that has the highest rating ratio? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select owner from channel order by rating_in_percent desc limit 1
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show me the owner of the channel with the highest rating. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select owner from channel order by rating_in_percent desc limit 1
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: how many programs are there? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select count ( * ) from program
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of programs. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select count ( * ) from program
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: list all the names of programs, ordering by launch time. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select name from program order by launch asc
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the list of program names, sorted by the order of launch date? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select name from program order by launch asc
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the name, origin and owner of each program. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select name , origin , owner from program
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the name, origin and owner of each program? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select name , origin , owner from program
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: find the name of the program that was launched most recently. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select name from program order by launch desc limit 1
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which program was launched most recently? Return the program name. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select name from program order by launch desc limit 1
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: find the total percentage share of all channels owned by CCTV. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select sum ( share_in_percent ) from channel where owner = 'CCTV'
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the total share (in percent) of all the channels owned by CCTV? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select sum ( share_in_percent ) from channel where owner = 'CCTV'
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the names of the channels that are broadcast in the morning. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select channel.name from channel join broadcast on channel.channel_id = broadcast.channel_id where broadcast.time_of_day = 'Morning'
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which channels are broadcast in the morning? Give me the channel names. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select channel.name from channel join broadcast on channel.channel_id = broadcast.channel_id where broadcast.time_of_day = 'Morning'
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: what are the names of the channels that broadcast in both morning and night? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select channel.name from channel join broadcast on channel.channel_id = broadcast.channel_id where broadcast.time_of_day = 'Morning' intersect select channel.name from channel join broadcast on channel.channel_id = broadcast.channel_id where broadcast.time_of_day = 'Night'
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which channels broadcast both in the morning and at night? Give me the channel names. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select channel.name from channel join broadcast on channel.channel_id = broadcast.channel_id where broadcast.time_of_day = 'Morning' intersect select channel.name from channel join broadcast on channel.channel_id = broadcast.channel_id where broadcast.time_of_day = 'Night'
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: how many programs are broadcast in each time section of the day? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select count ( * ) , time_of_day from broadcast group by time_of_day
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of programs broadcast for each time section of a day. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select count ( * ) , time_of_day from broadcast group by time_of_day
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: find the number of different programs that are broadcast during night time. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select count ( distinct program_id ) from broadcast where time_of_day = 'Night'
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many distinct programs are broadcast at "Night" time? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select count ( distinct program_id ) from broadcast where time_of_day = 'Night'
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the names of programs that are never broadcasted in the morning. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select name from program except select program.name from program join broadcast on program.program_id = broadcast.program_id where broadcast.time_of_day = 'Morning'
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which programs are never broadcasted in the morning? Give me the names of the programs. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select name from program except select program.name from program join broadcast on program.program_id = broadcast.program_id where broadcast.time_of_day = 'Morning'
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: find the program owners that have some programs in both morning and night time. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select program.owner from program join broadcast on program.program_id = broadcast.program_id where broadcast.time_of_day = 'Morning' intersect select program.owner from program join broadcast on program.program_id = broadcast.program_id where broadcast.time_of_day = 'Night'
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Who are the owners of the programs that broadcast both in the morning and at night? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select program.owner from program join broadcast on program.program_id = broadcast.program_id where broadcast.time_of_day = 'Morning' intersect select program.owner from program join broadcast on program.program_id = broadcast.program_id where broadcast.time_of_day = 'Night'
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List all program origins in the alphabetical order. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select origin from program order by origin asc
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the list of program origins ordered alphabetically? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select origin from program order by origin asc
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: what is the number of different channel owners? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select count ( distinct owner ) from channel
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of distinct channel owners. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select count ( distinct owner ) from channel
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: find the names of programs whose origin is not in Beijing. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select name from program where origin != 'Beijing'
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which programs' origins are not "Beijing"? Give me the program names. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select name from program where origin != 'Beijing'
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of the channels owned by CCTV or HBS? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select name from channel where owner = 'CCTV' or owner = 'HBS'
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names of all the channels owned by either CCTV or HBS | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select name from channel where owner = 'CCTV' or owner = 'HBS'
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the total rating ratio for each channel owner. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select sum ( rating_in_percent ) , owner from channel group by owner
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the total rating of channel for each channel owner? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select sum ( rating_in_percent ) , owner from channel group by owner
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the name of the program that is broadcast most frequently. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select program.name from program join broadcast on program.program_id = broadcast.program_id group by broadcast.program_id order by count ( * ) desc limit 1
program_share
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which program is broadcast most frequently? Give me the program name. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | ### Response: select program.name from program join broadcast on program.program_id = broadcast.program_id group by broadcast.program_id order by count ( * ) desc limit 1
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many courses are there in total? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select count ( * ) from courses
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the total number of courses offered. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select count ( * ) from courses
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the descriptions of the courses with name "database"? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select course_description from courses where course_name = 'database'
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the description for the courses named "database". | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select course_description from courses where course_name = 'database'
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the addresses of the course authors or tutors with personal name "Cathrine" | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select address_line_1 from course_authors_and_tutors where personal_name = 'Cathrine'
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the addresses of the course authors or tutors whose personal name is "Cathrine". | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select address_line_1 from course_authors_and_tutors where personal_name = 'Cathrine'
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the addresses of all the course authors or tutors. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select address_line_1 from course_authors_and_tutors
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the address of each course author or tutor? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select address_line_1 from course_authors_and_tutors
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List all the login names and family names of course author and tutors. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select login_name , family_name from course_authors_and_tutors
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the login names and family names of course author and tutors? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select login_name , family_name from course_authors_and_tutors
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List all the dates of enrollment and completion of students. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select date_of_enrolment , date_of_completion from student_course_enrolment
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are all the dates of enrollment and completion in record? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select date_of_enrolment , date_of_completion from student_course_enrolment
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many distinct students are enrolled in courses? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select count ( distinct student_id ) from student_course_enrolment
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the number of distinct students enrolled in courses. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select count ( distinct student_id ) from student_course_enrolment
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many distinct courses are enrolled in by students? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select count ( course_id ) from student_course_enrolment
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the number of distinct courses that have enrolled students. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select count ( course_id ) from student_course_enrolment
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the dates of the tests taken with result "Pass". | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select date_test_taken from student_tests_taken where test_result = 'Pass'
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which tests have "Pass" results? Return the dates when the tests were taken. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select date_test_taken from student_tests_taken where test_result = 'Pass'
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many tests have result "Fail"? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select count ( * ) from student_tests_taken where test_result = 'Fail'
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of tests with "Fail" result. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select count ( * ) from student_tests_taken where test_result = 'Fail'
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the login names of the students with family name "Ward"? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select login_name from students where family_name = 'Ward'
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the login names of the students whose family name is "Ward". | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select login_name from students where family_name = 'Ward'
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the dates of the latest logon of the students with family name "Jaskolski" or "Langosh"? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select date_of_latest_logon from students where family_name = 'Jaskolski' or family_name = 'Langosh'
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the latest logon date of the students whose family name is "Jaskolski" or "Langosh". | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select date_of_latest_logon from students where family_name = 'Jaskolski' or family_name = 'Langosh'
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many students have personal names that contain the word "son"? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select count ( * ) from students where personal_name like '%son%'
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the number of students who have the word "son" in their personal names. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select count ( * ) from students where personal_name like '%son%'
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List all the subject names. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select subject_name from subjects
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all the subjects. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select subject_name from subjects
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List all the information about course authors and tutors in alphabetical order of the personal name. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select * from course_authors_and_tutors order by personal_name asc
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Sort the information about course authors and tutors in alphabetical order of the personal name. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select * from course_authors_and_tutors order by personal_name asc
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the personal names and family names of all the students in alphabetical order of family name. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select personal_name , family_name from students order by family_name asc
e_learning
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the personal names and family names of the students? Sort the result in alphabetical order of the family name. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | ### Response: select personal_name , family_name from students order by family_name asc