messages
listlengths
3
3
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### Return the total and minimum enrollments across all schools.\nSELECT \n" }, { "role": "assistant", "content": "sum ( enrollment ) , min ( enrollment ) from university" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### Find the total student enrollment for different affiliation type schools.\nSELECT \n" }, { "role": "assistant", "content": "sum ( enrollment ) , affiliation from university group by affiliation" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### What are the total enrollments of universities of each affiliation type?\nSELECT \n" }, { "role": "assistant", "content": "sum ( enrollment ) , affiliation from university group by affiliation" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### How many schools do not participate in the basketball match?\nSELECT \n" }, { "role": "assistant", "content": "count ( * ) from university where school_id not in ( select school_id from basketball_match )" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### Count the number of universities that do not participate in the baketball match.\nSELECT \n" }, { "role": "assistant", "content": "count ( * ) from university where school_id not in ( select school_id from basketball_match )" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### Find the schools that were either founded after 1850 or public.\nSELECT \n" }, { "role": "assistant", "content": "school from university where founded > 1850 or affiliation = 'Public'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### What are the schools that were either founded before 1850 or are public?\nSELECT \n" }, { "role": "assistant", "content": "school from university where founded > 1850 or affiliation = 'Public'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### Find how many different affiliation types there are.\nSELECT \n" }, { "role": "assistant", "content": "count ( distinct affiliation ) from university" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### Count the number of different affiliation types.\nSELECT \n" }, { "role": "assistant", "content": "count ( distinct affiliation ) from university" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### Find how many school locations have the word 'NY'.\nSELECT \n" }, { "role": "assistant", "content": "count ( * ) from university where location like '%NY%'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### How many universities have a location that contains NY?\nSELECT \n" }, { "role": "assistant", "content": "count ( * ) from university where location like '%NY%'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### Find the team names of the universities whose enrollments are smaller than the average enrollment size.\nSELECT \n" }, { "role": "assistant", "content": "basketball_match.team_name from university join basketball_match on university.school_id = basketball_match.school_id where enrollment < ( select avg ( enrollment ) from university )" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### What are the names of teams from universities that have a below average enrollment?\nSELECT \n" }, { "role": "assistant", "content": "basketball_match.team_name from university join basketball_match on university.school_id = basketball_match.school_id where enrollment < ( select avg ( enrollment ) from university )" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### Find the number of universities that have over a 20000 enrollment size for each affiliation type.\nSELECT \n" }, { "role": "assistant", "content": "count ( * ) , affiliation from university where enrollment > 20000 group by affiliation" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### What are the different affiliations, and how many schools with each have an enrollment size of above 20000?\nSELECT \n" }, { "role": "assistant", "content": "count ( * ) , affiliation from university where enrollment > 20000 group by affiliation" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type.\nSELECT \n" }, { "role": "assistant", "content": "sum ( enrollment ) , affiliation from university where founded > 1850 group by affiliation" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### What are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type?\nSELECT \n" }, { "role": "assistant", "content": "sum ( enrollment ) , affiliation from university where founded > 1850 group by affiliation" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### What is the maximum enrollment across all schools?\nSELECT \n" }, { "role": "assistant", "content": "max ( enrollment ) from university" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### Return the maximum enrollment across all schools.\nSELECT \n" }, { "role": "assistant", "content": "max ( enrollment ) from university" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### List all information regarding the basketball match.\nSELECT \n" }, { "role": "assistant", "content": "* from basketball_match" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### What is all the information about the basketball match?\nSELECT \n" }, { "role": "assistant", "content": "* from basketball_match" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### List names of all teams in the basketball competition, ordered by all home scores in descending order.\nSELECT \n" }, { "role": "assistant", "content": "team_name from basketball_match order by all_home desc" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# basketball_match ( team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral )\n# university ( school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference )\n# basketball_match.school_id = university.school_id\n\n#\n### What are the names of all the teams in the basketball competition, sorted by all home scores in descending order?\nSELECT \n" }, { "role": "assistant", "content": "team_name from basketball_match order by all_home desc" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### the names of models that launched between 2002 and 2004.\nSELECT \n" }, { "role": "assistant", "content": "model_name from chip_model where launch_year between 2002 and 2004" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### Which model has the least amount of RAM? List the model name and the amount of RAM.\nSELECT \n" }, { "role": "assistant", "content": "model_name , ram_mib from chip_model order by ram_mib asc limit 1" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### What are the chip model and screen mode of the phone with hardware model name \"LG-P760\"?\nSELECT \n" }, { "role": "assistant", "content": "chip_model , screen_mode from phone where hardware_model_name = 'LG-P760'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### How many phone hardware models are produced by the company named \"Nokia Corporation\"?\nSELECT \n" }, { "role": "assistant", "content": "count ( * ) from phone where company_name = 'Nokia Corporation'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### What is maximum and minimum RAM size of phone produced by company named \"Nokia Corporation\"?\nSELECT \n" }, { "role": "assistant", "content": "max ( chip_model.ram_mib ) , min ( chip_model.ram_mib ) from chip_model join phone on chip_model.model_name = phone.chip_model where phone.company_name = 'Nokia Corporation'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### What is the average ROM size of phones produced by the company named \"Nokia Corporation\"?\nSELECT \n" }, { "role": "assistant", "content": "avg ( chip_model.rom_mib ) from chip_model join phone on chip_model.model_name = phone.chip_model where phone.company_name = 'Nokia Corporation'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### List the hardware model name and company name for all the phones that were launched in year 2002 or have RAM size greater than 32.\nSELECT \n" }, { "role": "assistant", "content": "phone.hardware_model_name , phone.company_name from chip_model join phone on chip_model.model_name = phone.chip_model where chip_model.launch_year = 2002 or chip_model.ram_mib > 32" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.\nSELECT \n" }, { "role": "assistant", "content": "hardware_model_name , company_name from phone where accreditation_type like 'Full'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is \"LG-P760\".\nSELECT \n" }, { "role": "assistant", "content": "screen_mode.char_cells , screen_mode.pixels , screen_mode.hardware_colours from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where phone.hardware_model_name = 'LG-P760'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### List the hardware model name and company name for the phone whose screen mode type is \"Graphics.\"\nSELECT \n" }, { "role": "assistant", "content": "phone.hardware_model_name , phone.company_name from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where screen_mode.type = 'Graphics'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### Find the name of the company that has the least number of phone models. List the company name and the number of phone model produced by that company.\nSELECT \n" }, { "role": "assistant", "content": "company_name , count ( * ) from phone group by company_name order by count ( * ) asc limit 1" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### List the name of the company that produced more than one phone model.\nSELECT \n" }, { "role": "assistant", "content": "company_name from phone group by company_name having count ( * ) > 1" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### List the maximum, minimum and average number of used kb in screen mode.\nSELECT \n" }, { "role": "assistant", "content": "max ( used_kb ) , min ( used_kb ) , avg ( used_kb ) from screen_mode" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### List the name of the phone model launched in year 2002 and with the highest RAM size.\nSELECT \n" }, { "role": "assistant", "content": "phone.hardware_model_name from chip_model join phone on chip_model.model_name = phone.chip_model where chip_model.launch_year = 2002 order by chip_model.ram_mib desc limit 1" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### What are the wifi and screen mode type of the hardware model named \"LG-P760\"?\nSELECT \n" }, { "role": "assistant", "content": "chip_model.wifi , screen_mode.type from chip_model join phone on chip_model.model_name = phone.chip_model join screen_mode on phone.screen_mode = screen_mode.graphics_mode where phone.hardware_model_name = 'LG-P760'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### List the hardware model name for the phones that have screen mode type \"Text\" or RAM size greater than 32.\nSELECT \n" }, { "role": "assistant", "content": "phone.hardware_model_name from chip_model join phone on chip_model.model_name = phone.chip_model join screen_mode on phone.screen_mode = screen_mode.graphics_mode where screen_mode.type = 'Text' or chip_model.ram_mib > 32" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### List the hardware model name for the phones that were produced by \"Nokia Corporation\" or whose screen mode type is \"Graphics.\"\nSELECT \n" }, { "role": "assistant", "content": "distinct phone.hardware_model_name from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where screen_mode.type = 'Graphics' or phone.company_name = 'Nokia Corporation'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### List the hardware model name for the phons that were produced by \"Nokia Corporation\" but whose screen mode type is not Text.\nSELECT \n" }, { "role": "assistant", "content": "distinct phone.hardware_model_name from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where phone.company_name = 'Nokia Corporation' and screen_mode.type != 'Text'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15.\nSELECT \n" }, { "role": "assistant", "content": "distinct phone.hardware_model_name , phone.company_name from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where screen_mode.used_kb between 10 and 15" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### Find the number of phones for each accreditation type.\nSELECT \n" }, { "role": "assistant", "content": "accreditation_type , count ( * ) from phone group by accreditation_type" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### How many phones belongs to each accreditation type?\nSELECT \n" }, { "role": "assistant", "content": "accreditation_type , count ( * ) from phone group by accreditation_type" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### Find the accreditation level that more than 3 phones use.\nSELECT \n" }, { "role": "assistant", "content": "accreditation_level from phone group by accreditation_level having count ( * ) > 3" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### Find the details for all chip models.\nSELECT \n" }, { "role": "assistant", "content": "* from chip_model" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### How many models do not have the wifi function?\nSELECT \n" }, { "role": "assistant", "content": "count ( * ) from chip_model where wifi = 'No'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### Count the number of chip model that do not have wifi.\nSELECT \n" }, { "role": "assistant", "content": "count ( * ) from chip_model where wifi = 'No'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### List all the model names sorted by their launch year.\nSELECT \n" }, { "role": "assistant", "content": "model_name from chip_model order by launch_year asc" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### Find the average ram mib size of the chip models that are never used by any phone.\nSELECT \n" }, { "role": "assistant", "content": "avg ( ram_mib ) from chip_model where model_name not in ( select chip_model from phone )" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### Find the names of the chip models that are not used by any phone with full accreditation type.\nSELECT \n" }, { "role": "assistant", "content": "model_name from chip_model except select chip_model from phone where accreditation_type = 'Full'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# chip_model ( model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth )\n# screen_mode ( graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type )\n# phone ( company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode )\n# phone.chip_model = chip_model.model_name\n# phone.screen_mode = screen_mode.graphics_mode\n\n#\n### Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types.\nSELECT \n" }, { "role": "assistant", "content": "screen_mode.pixels from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where phone.accreditation_type = 'Provisional' intersect select screen_mode.pixels from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where phone.accreditation_type = 'Full'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### How many countries are there in total?\nSELECT \n" }, { "role": "assistant", "content": "count ( * ) from country" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Count the number of countries.\nSELECT \n" }, { "role": "assistant", "content": "count ( * ) from country" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Show the country name and capital of all countries.\nSELECT \n" }, { "role": "assistant", "content": "country_name , capital from country" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### What are the names and capitals of each country?\nSELECT \n" }, { "role": "assistant", "content": "country_name , capital from country" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Show all official native languages that contain the word \"English\".\nSELECT \n" }, { "role": "assistant", "content": "official_native_language from country where official_native_language like '%English%'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### What are the official native languages that contain the string \"English\".\nSELECT \n" }, { "role": "assistant", "content": "official_native_language from country where official_native_language like '%English%'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Show all distinct positions of matches.\nSELECT \n" }, { "role": "assistant", "content": "distinct position from match_season" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### What are the different positions for match season?\nSELECT \n" }, { "role": "assistant", "content": "distinct position from match_season" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Show the players from college UCLA.\nSELECT \n" }, { "role": "assistant", "content": "player from match_season where college = 'UCLA'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Who are the players from UCLA?\nSELECT \n" }, { "role": "assistant", "content": "player from match_season where college = 'UCLA'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Show the distinct position of players from college UCLA or Duke.\nSELECT \n" }, { "role": "assistant", "content": "distinct position from match_season where college = 'UCLA' or college = 'Duke'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### What are the different positions of players from UCLA or Duke colleges?\nSELECT \n" }, { "role": "assistant", "content": "distinct position from match_season where college = 'UCLA' or college = 'Duke'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Show the draft pick numbers and draft classes of players whose positions are defenders.\nSELECT \n" }, { "role": "assistant", "content": "draft_pick_number , draft_class from match_season where position = 'Defender'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### What are the draft pick numbers and draft classes for players who play the Defender position?\nSELECT \n" }, { "role": "assistant", "content": "draft_pick_number , draft_class from match_season where position = 'Defender'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### How many distinct teams are involved in match seasons?\nSELECT \n" }, { "role": "assistant", "content": "count ( distinct team ) from match_season" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Count the number of different teams involved in match season.\nSELECT \n" }, { "role": "assistant", "content": "count ( distinct team ) from match_season" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Show the players and the years played.\nSELECT \n" }, { "role": "assistant", "content": "player , years_played from player" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Who are the different players and how many years has each played?\nSELECT \n" }, { "role": "assistant", "content": "player , years_played from player" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Show all team names.\nSELECT \n" }, { "role": "assistant", "content": "name from team" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### What are the names of all teams?\nSELECT \n" }, { "role": "assistant", "content": "name from team" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Show the season, the player, and the name of the country that player belongs to.\nSELECT \n" }, { "role": "assistant", "content": "match_season.season , match_season.player , country.country_name from country join match_season on country.country_id = match_season.country" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### For each player, what are their name, season, and country that they belong to?\nSELECT \n" }, { "role": "assistant", "content": "match_season.season , match_season.player , country.country_name from country join match_season on country.country_id = match_season.country" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Which players are from Indonesia?\nSELECT \n" }, { "role": "assistant", "content": "match_season.player from country join match_season on country.country_id = match_season.country where country.country_name = 'Indonesia'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Who are the players from Indonesia?\nSELECT \n" }, { "role": "assistant", "content": "match_season.player from country join match_season on country.country_id = match_season.country where country.country_name = 'Indonesia'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### What are the distinct positions of the players from a country whose capital is Dublin?\nSELECT \n" }, { "role": "assistant", "content": "distinct match_season.position from country join match_season on country.country_id = match_season.country where country.capital = 'Dublin'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Give the different positions of players who play for the country with the capital Dublin.\nSELECT \n" }, { "role": "assistant", "content": "distinct match_season.position from country join match_season on country.country_id = match_season.country where country.capital = 'Dublin'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### What are the official languages of the countries of players from Maryland or Duke college?\nSELECT \n" }, { "role": "assistant", "content": "country.official_native_language from country join match_season on country.country_id = match_season.country where match_season.college = 'Maryland' or match_season.college = 'Duke'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Return the official native languages of countries who have players from Maryland or Duke colleges.\nSELECT \n" }, { "role": "assistant", "content": "country.official_native_language from country join match_season on country.country_id = match_season.country where match_season.college = 'Maryland' or match_season.college = 'Duke'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### How many distinct official languages are there among countries of players whose positions are defenders.\nSELECT \n" }, { "role": "assistant", "content": "count ( distinct country.official_native_language ) from country join match_season on country.country_id = match_season.country where match_season.position = 'Defender'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Count the number of different official languages corresponding to countries that players who play Defender are from.\nSELECT \n" }, { "role": "assistant", "content": "count ( distinct country.official_native_language ) from country join match_season on country.country_id = match_season.country where match_season.position = 'Defender'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Show the season, the player, and the name of the team that players belong to.\nSELECT \n" }, { "role": "assistant", "content": "match_season.season , match_season.player , team.name from match_season join team on match_season.team = team.team_id" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Who are the different players, what season do they play in, and what is the name of the team they are on?\nSELECT \n" }, { "role": "assistant", "content": "match_season.season , match_season.player , team.name from match_season join team on match_season.team = team.team_id" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Show the positions of the players from the team with name \"Ryley Goldner\".\nSELECT \n" }, { "role": "assistant", "content": "match_season.position from match_season join team on match_season.team = team.team_id where team.name = 'Ryley Goldner'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Return the positions of players on the team Ryley Goldner.\nSELECT \n" }, { "role": "assistant", "content": "match_season.position from match_season join team on match_season.team = team.team_id where team.name = 'Ryley Goldner'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### How many distinct colleges are associated with players from the team with name \"Columbus Crew\".\nSELECT \n" }, { "role": "assistant", "content": "count ( distinct match_season.college ) from match_season join team on match_season.team = team.team_id where team.name = 'Columbus Crew'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Count the number of different colleges that players who play for Columbus Crew are from.\nSELECT \n" }, { "role": "assistant", "content": "count ( distinct match_season.college ) from match_season join team on match_season.team = team.team_id where team.name = 'Columbus Crew'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Show the players and years played for players from team \"Columbus Crew\".\nSELECT \n" }, { "role": "assistant", "content": "player.player , player.years_played from player join team on player.team = team.team_id where team.name = 'Columbus Crew'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### What are the players who played for Columbus Crew, and how many years did each play for?\nSELECT \n" }, { "role": "assistant", "content": "player.player , player.years_played from player join team on player.team = team.team_id where team.name = 'Columbus Crew'" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Show the position of players and the corresponding number of players.\nSELECT \n" }, { "role": "assistant", "content": "position , count ( * ) from match_season group by position" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### How many players played each position?\nSELECT \n" }, { "role": "assistant", "content": "position , count ( * ) from match_season group by position" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Show the country names and the corresponding number of players.\nSELECT \n" }, { "role": "assistant", "content": "country_name , count ( * ) from country join match_season on country.country_id = match_season.country group by country.country_name" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### How many players are from each country?\nSELECT \n" }, { "role": "assistant", "content": "country_name , count ( * ) from country join match_season on country.country_id = match_season.country group by country.country_name" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Return all players sorted by college in ascending alphabetical order.\nSELECT \n" }, { "role": "assistant", "content": "player from match_season order by college asc" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### What are all the players who played in match season, sorted by college in ascending alphabetical order?\nSELECT \n" }, { "role": "assistant", "content": "player from match_season order by college asc" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Show the most common position of players in match seasons.\nSELECT \n" }, { "role": "assistant", "content": "position from match_season group by position order by count ( * ) desc limit 1" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### What is the position that is most common among players in match seasons?\nSELECT \n" }, { "role": "assistant", "content": "position from match_season group by position order by count ( * ) desc limit 1" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### Show the top 3 most common colleges of players in match seasons.\nSELECT \n" }, { "role": "assistant", "content": "college from match_season group by college order by count ( * ) desc limit 3" } ]
[ { "role": "system", "content": "You are an excellent SQL writer." }, { "role": "user", "content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# country ( country_id , country_name , capital , official_native_language )\n# team ( team_id , name )\n# match_season ( season , player , position , country , team , draft_pick_number , draft_class , college )\n# player ( player_id , player , years_played , total_wl , singles_wl , doubles_wl , team )\n# match_season.team = team.team_id\n# match_season.country = country.country_id\n# player.team = team.team_id\n\n#\n### What are the three colleges from which the most players are from?\nSELECT \n" }, { "role": "assistant", "content": "college from match_season group by college order by count ( * ) desc limit 3" } ]