Dataset Viewer
Auto-converted to Parquet Duplicate
question
stringlengths
16
239
table_name
stringlengths
3
43
columns
listlengths
5
20
column_types
listlengths
5
20
gold_sql
stringlengths
35
209
db_id
stringclasses
1 value
source
stringclasses
1 value
What position does the player who played for butler cc (ks) play?
raptors_players
[ "player", "no", "nationality", "position", "years_in_toronto", "school_club_team" ]
[ "text", "text", "text", "text", "text", "text" ]
SELECT "position" FROM raptors_players WHERE "school_club_team" = 'Butler CC (KS)'
dev
wikisql
How many schools did player number 3 play at?
raptors_players
[ "player", "no", "nationality", "position", "years_in_toronto", "school_club_team" ]
[ "text", "text", "text", "text", "text", "text" ]
SELECT COUNT("school_club_team") FROM raptors_players WHERE "no" = '3'
dev
wikisql
What school did player number 21 play for?
raptors_players
[ "player", "no", "nationality", "position", "years_in_toronto", "school_club_team" ]
[ "text", "text", "text", "text", "text", "text" ]
SELECT "school_club_team" FROM raptors_players WHERE "no" = '21'
dev
wikisql
Who is the player that wears number 42?
raptors_players
[ "player", "no", "nationality", "position", "years_in_toronto", "school_club_team" ]
[ "text", "text", "text", "text", "text", "text" ]
SELECT "player" FROM raptors_players WHERE "no" = '42'
dev
wikisql
What player played guard for toronto in 1996-97?
raptors_players
[ "player", "no", "nationality", "position", "years_in_toronto", "school_club_team" ]
[ "text", "text", "text", "text", "text", "text" ]
SELECT "player" FROM raptors_players WHERE "position" = 'Guard' AND "years_in_toronto" = '1996-97'
dev
wikisql
Who are all of the players on the Westchester High School club team?
raptors_players_2
[ "player", "no", "nationality", "position", "years_in_toronto", "school_club_team" ]
[ "text", "text", "text", "text", "text", "text" ]
SELECT "player" FROM raptors_players_2 WHERE "school_club_team" = 'Westchester High School'
dev
wikisql
What school/club team is Amir Johnson on?
raptors_players_2
[ "player", "no", "nationality", "position", "years_in_toronto", "school_club_team" ]
[ "text", "text", "text", "text", "text", "text" ]
SELECT "school_club_team" FROM raptors_players_2 WHERE "player" = 'Amir Johnson'
dev
wikisql
What are the total amount of numbers on the Toronto team in 2005-06?
raptors_players_2
[ "player", "no", "nationality", "position", "years_in_toronto", "school_club_team" ]
[ "text", "text", "text", "text", "text", "text" ]
SELECT COUNT("no") FROM raptors_players_2 WHERE "years_in_toronto" = '2005-06'
dev
wikisql
What are the total number of positions on the Toronto team in 2006-07?
raptors_players_2
[ "player", "no", "nationality", "position", "years_in_toronto", "school_club_team" ]
[ "text", "text", "text", "text", "text", "text" ]
SELECT COUNT("position") FROM raptors_players_2 WHERE "years_in_toronto" = '2006-07'
dev
wikisql
What are the nationality of the players on the Fresno State school/club team?
raptors_players_2
[ "player", "no", "nationality", "position", "years_in_toronto", "school_club_team" ]
[ "text", "text", "text", "text", "text", "text" ]
SELECT "nationality" FROM raptors_players_2 WHERE "school_club_team" = 'Fresno State'
dev
wikisql
What school/club team is Trey Johnson on?
raptors_players_2
[ "player", "no", "nationality", "position", "years_in_toronto", "school_club_team" ]
[ "text", "text", "text", "text", "text", "text" ]
SELECT "school_club_team" FROM raptors_players_2 WHERE "player" = 'Trey Johnson'
dev
wikisql
When did Jacques Chirac stop being a G8 leader?
g8_leadership
[ "entered_office_as_head_of_state_or_government", "began_time_as_senior_g8_leader", "ended_time_as_senior_g8_leader", "person", "office" ]
[ "text", "text", "text", "text", "text" ]
SELECT "ended_time_as_senior_g8_leader" FROM g8_leadership WHERE "person" = 'Jacques Chirac'
dev
wikisql
When did the Prime Minister of Italy take office?
g8_leadership
[ "entered_office_as_head_of_state_or_government", "began_time_as_senior_g8_leader", "ended_time_as_senior_g8_leader", "person", "office" ]
[ "text", "text", "text", "text", "text" ]
SELECT "entered_office_as_head_of_state_or_government" FROM g8_leadership WHERE "office" = 'Prime Minister of Italy'
dev
wikisql
What is the English name of the country whose official native language is Dutch Papiamento?
countries_info
[ "country_exonym", "capital_exonym", "country_endonym", "capital_endonym", "official_or_native_language_s_alphabet_script" ]
[ "text", "text", "text", "text", "text" ]
SELECT "country_exonym" FROM countries_info WHERE "official_or_native_language_s_alphabet_script" = 'Dutch Papiamento'
dev
wikisql
What official or native languages are spoken in the country whose capital city is Canberra?
countries_info
[ "country_exonym", "capital_exonym", "country_endonym", "capital_endonym", "official_or_native_language_s_alphabet_script" ]
[ "text", "text", "text", "text", "text" ]
SELECT "official_or_native_language_s_alphabet_script" FROM countries_info WHERE "capital_exonym" = 'Canberra'
dev
wikisql
What is the local name given to the city of Canberra?
countries_info
[ "country_exonym", "capital_exonym", "country_endonym", "capital_endonym", "official_or_native_language_s_alphabet_script" ]
[ "text", "text", "text", "text", "text" ]
SELECT "capital_endonym" FROM countries_info WHERE "capital_exonym" = 'Canberra'
dev
wikisql
What is the local name given to the capital of Anguilla?
countries_info
[ "country_exonym", "capital_exonym", "country_endonym", "capital_endonym", "official_or_native_language_s_alphabet_script" ]
[ "text", "text", "text", "text", "text" ]
SELECT "capital_endonym" FROM countries_info WHERE "country_endonym" = 'Anguilla'
dev
wikisql
What is the English name given to the city of St. John's?
countries_info
[ "country_exonym", "capital_exonym", "country_endonym", "capital_endonym", "official_or_native_language_s_alphabet_script" ]
[ "text", "text", "text", "text", "text" ]
SELECT "capital_exonym" FROM countries_info WHERE "capital_endonym" = 'St. John''s'
dev
wikisql
How many capital cities does Australia have?
countries_info
[ "country_exonym", "capital_exonym", "country_endonym", "capital_endonym", "official_or_native_language_s_alphabet_script" ]
[ "text", "text", "text", "text", "text" ]
SELECT COUNT("capital_endonym") FROM countries_info WHERE "country_endonym" = 'Australia'
dev
wikisql
The episode with production code 9abx02 was originally aired on what date?
episodes_table
[ "no_in_set", "no_in_series", "title", "directed_by", "written_by", "original_air_date", "production_code" ]
[ "real", "real", "text", "text", "text", "text", "text" ]
SELECT "original_air_date" FROM episodes_table WHERE "production_code" = '9ABX02'
dev
wikisql
What is the episode number that has production code 8abx15?
episodes_table
[ "no_in_set", "no_in_series", "title", "directed_by", "written_by", "original_air_date", "production_code" ]
[ "real", "real", "text", "text", "text", "text", "text" ]
SELECT MIN("no_in_series") FROM episodes_table WHERE "production_code" = '8ABX15'
dev
wikisql
Name the minimum tiesplayed for 6 years
lit_davis_cup_players
[ "player", "highest_singles_ranking", "highest_doubles_ranking", "first_year_played", "years_played", "ties_played", "total_w_l", "singles_w_l", "doubles_w_l" ]
[ "text", "text", "text", "real", "real", "real", "text", "text", "text" ]
SELECT MIN("ties_played") FROM lit_davis_cup_players WHERE "years_played" = 6
dev
wikisql
What is the amount of trees, that require replacement when prevailing types, % is pine — 29.37 poplar — 26.12 acer negundo — 13.2?
tree_district_data
[ "district", "total_amount_of_trees", "prevailing_types", "amount_of_old_trees", "amount_of_trees_that_require_replacement" ]
[ "text", "real", "text", "text", "text" ]
SELECT "amount_of_trees_that_require_replacement" FROM tree_district_data WHERE "prevailing_types" = 'Pine — 29.37 Poplar — 26.12 Acer negundo — 13.2'
dev
wikisql
What is the amount of trees, that require replacement when district is leninsky?
tree_district_data
[ "district", "total_amount_of_trees", "prevailing_types", "amount_of_old_trees", "amount_of_trees_that_require_replacement" ]
[ "text", "real", "text", "text", "text" ]
SELECT "amount_of_trees_that_require_replacement" FROM tree_district_data WHERE "district" = 'Leninsky'
dev
wikisql
What is the district when the total amount of trees is smaller than 150817.6878461314 and amount of old trees is 1,928 (1.89%)?
tree_district_data
[ "district", "total_amount_of_trees", "prevailing_types", "amount_of_old_trees", "amount_of_trees_that_require_replacement" ]
[ "text", "real", "text", "text", "text" ]
SELECT "district" FROM tree_district_data WHERE "total_amount_of_trees" < 150817.6878461314 AND "amount_of_old_trees" = '1,928 (1.89%)'
dev
wikisql
What is the amount of trees, that require replacement when the district is motovilikhinsky?
tree_district_data
[ "district", "total_amount_of_trees", "prevailing_types", "amount_of_old_trees", "amount_of_trees_that_require_replacement" ]
[ "text", "real", "text", "text", "text" ]
SELECT "amount_of_trees_that_require_replacement" FROM tree_district_data WHERE "district" = 'Motovilikhinsky'
dev
wikisql
What is the total amount of trees when district is leninsky?
tree_district_data
[ "district", "total_amount_of_trees", "prevailing_types", "amount_of_old_trees", "amount_of_trees_that_require_replacement" ]
[ "text", "real", "text", "text", "text" ]
SELECT MAX("total_amount_of_trees") FROM tree_district_data WHERE "district" = 'Leninsky'
dev
wikisql
What is the district when prevailing types, % is acer negundo — 30.22 tilia — 18.6 poplar — 15.23?
tree_district_data
[ "district", "total_amount_of_trees", "prevailing_types", "amount_of_old_trees", "amount_of_trees_that_require_replacement" ]
[ "text", "real", "text", "text", "text" ]
SELECT "district" FROM tree_district_data WHERE "prevailing_types" = 'Acer negundo — 30.22 Tilia — 18.6 Poplar — 15.23'
dev
wikisql
When the value of "since beginning of big 12" is synonymous with its' category, what are the in Ames values?
iowa_state_basketball_stats
[ "iowa_state_vs", "overall_record", "in_ames", "at_opponents_venue", "at_neutral_site", "last_5_meetings", "last_10_meetings", "current_streak", "since_beginning_of_big_12" ]
[ "text", "text", "text", "text", "text", "text", "text", "text", "text" ]
SELECT "in_ames" FROM iowa_state_basketball_stats WHERE "since_beginning_of_big_12" = 'Since Beginning of Big 12'
dev
wikisql
what's the u.s. open cup status for regular season of 4th, atlantic division
soccer_team_stats
[ "year", "division", "league", "regular_season", "playoffs", "u_s_open_cup" ]
[ "real", "text", "text", "text", "text", "text" ]
SELECT "u_s_open_cup" FROM soccer_team_stats WHERE "regular_season" = '4th, Atlantic Division'
dev
wikisql
how many division did not qualify for u.s. open cup in 2003
soccer_team_stats
[ "year", "division", "league", "regular_season", "playoffs", "u_s_open_cup" ]
[ "real", "text", "text", "text", "text", "text" ]
SELECT "division" FROM soccer_team_stats WHERE "u_s_open_cup" = 'Did Not Qualify' AND "year" = 2003
dev
wikisql
which round is u.s. open cup division semifinals
soccer_team_stats
[ "year", "division", "league", "regular_season", "playoffs", "u_s_open_cup" ]
[ "real", "text", "text", "text", "text", "text" ]
SELECT "u_s_open_cup" FROM soccer_team_stats WHERE "playoffs" = 'Division Semifinals'
dev
wikisql
what are all the playoffs for regular season is 1st, atlantic division
soccer_team_stats
[ "year", "division", "league", "regular_season", "playoffs", "u_s_open_cup" ]
[ "real", "text", "text", "text", "text", "text" ]
SELECT "playoffs" FROM soccer_team_stats WHERE "regular_season" = '1st, Atlantic Division'
dev
wikisql
what are all the playoffs for u.s. open cup in 1st round
soccer_team_stats
[ "year", "division", "league", "regular_season", "playoffs", "u_s_open_cup" ]
[ "real", "text", "text", "text", "text", "text" ]
SELECT "playoffs" FROM soccer_team_stats WHERE "u_s_open_cup" = '1st Round'
dev
wikisql
what is the total number of 2nd leg where aggregate is 7-2
fc_sion_uefa_cup
[ "season", "competition", "round", "opponents", "1st_leg", "2nd_leg", "aggregate" ]
[ "text", "text", "text", "text", "text", "text", "text" ]
SELECT COUNT("2nd_leg") FROM fc_sion_uefa_cup WHERE "aggregate" = '7-2'
dev
wikisql
what's the aggregate where 1st leg is 3–2
fc_sion_uefa_cup
[ "season", "competition", "round", "opponents", "1st_leg", "2nd_leg", "aggregate" ]
[ "text", "text", "text", "text", "text", "text", "text" ]
SELECT "aggregate" FROM fc_sion_uefa_cup WHERE "1st_leg" = '3–2'
dev
wikisql
what's the competition where aggregate is 4–7
fc_sion_uefa_cup
[ "season", "competition", "round", "opponents", "1st_leg", "2nd_leg", "aggregate" ]
[ "text", "text", "text", "text", "text", "text", "text" ]
SELECT "competition" FROM fc_sion_uefa_cup WHERE "aggregate" = '4–7'
dev
wikisql
what's the competition where 1st leg is 4-1 (h)
fc_sion_uefa_cup
[ "season", "competition", "round", "opponents", "1st_leg", "2nd_leg", "aggregate" ]
[ "text", "text", "text", "text", "text", "text", "text" ]
SELECT "competition" FROM fc_sion_uefa_cup WHERE "1st_leg" = '4-1 (h)'
dev
wikisql
what is the total number of round where opponents is haugar
fc_sion_uefa_cup
[ "season", "competition", "round", "opponents", "1st_leg", "2nd_leg", "aggregate" ]
[ "text", "text", "text", "text", "text", "text", "text" ]
SELECT COUNT("round") FROM fc_sion_uefa_cup WHERE "opponents" = 'Haugar'
dev
wikisql
what's the 1st leg where opponents is galatasaray
fc_sion_uefa_cup
[ "season", "competition", "round", "opponents", "1st_leg", "2nd_leg", "aggregate" ]
[ "text", "text", "text", "text", "text", "text", "text" ]
SELECT "1st_leg" FROM fc_sion_uefa_cup WHERE "opponents" = 'Galatasaray'
dev
wikisql
What is the highest Rd that Tom Sneva had the pole position in?
indycar_1983
[ "rd", "name", "pole_position", "fastest_lap", "winning_driver", "winning_team", "report" ]
[ "real", "text", "text", "text", "text", "text", "text" ]
SELECT MAX("rd") FROM indycar_1983 WHERE "pole_position" = 'Tom Sneva'
dev
wikisql
How many winning drivers were there in the race that had a fastest lap time of 56.920?
indycar_1983
[ "rd", "name", "pole_position", "fastest_lap", "winning_driver", "winning_team", "report" ]
[ "real", "text", "text", "text", "text", "text", "text" ]
SELECT COUNT("winning_driver") FROM indycar_1983 WHERE "fastest_lap" = '56.920'
dev
wikisql
How many reports are there in the race that Forsythe Racing won and Teo Fabi had the pole position in?
indycar_1983
[ "rd", "name", "pole_position", "fastest_lap", "winning_driver", "winning_team", "report" ]
[ "real", "text", "text", "text", "text", "text", "text" ]
SELECT COUNT("report") FROM indycar_1983 WHERE "winning_team" = 'Forsythe Racing' AND "pole_position" = 'Teo Fabi'
dev
wikisql
Which Rd took place at the Indianapolis 500?
indycar_1983
[ "rd", "name", "pole_position", "fastest_lap", "winning_driver", "winning_team", "report" ]
[ "real", "text", "text", "text", "text", "text", "text" ]
SELECT "rd" FROM indycar_1983 WHERE "name" = 'Indianapolis 500'
dev
wikisql
Which teams won when Bobby Rahal was their winning driver?
indycar_1983
[ "rd", "name", "pole_position", "fastest_lap", "winning_driver", "winning_team", "report" ]
[ "real", "text", "text", "text", "text", "text", "text" ]
SELECT "winning_team" FROM indycar_1983 WHERE "winning_driver" = 'Bobby Rahal'
dev
wikisql
What was the fastest lap time in the Escort Radar Warning 200?
indycar_1983
[ "rd", "name", "pole_position", "fastest_lap", "winning_driver", "winning_team", "report" ]
[ "real", "text", "text", "text", "text", "text", "text" ]
SELECT "fastest_lap" FROM indycar_1983 WHERE "name" = 'Escort Radar Warning 200'
dev
wikisql
What report was there for the porsche north america?
indy_car_1989
[ "rnd", "race_name", "circuit", "city_location", "date", "pole_position", "winning_driver", "winning_team", "report" ]
[ "text", "text", "text", "text", "text", "text", "text", "text", "text" ]
SELECT "report" FROM indy_car_1989 WHERE "winning_team" = 'Porsche North America'
dev
wikisql
What rnds were there for the phoenix international raceway?
indy_car_1989
[ "rnd", "race_name", "circuit", "city_location", "date", "pole_position", "winning_driver", "winning_team", "report" ]
[ "text", "text", "text", "text", "text", "text", "text", "text", "text" ]
SELECT "rnd" FROM indy_car_1989 WHERE "circuit" = 'Phoenix International Raceway'
dev
wikisql
Who was the pole position for the rnd equalling 12?
indy_car_1989
[ "rnd", "race_name", "circuit", "city_location", "date", "pole_position", "winning_driver", "winning_team", "report" ]
[ "text", "text", "text", "text", "text", "text", "text", "text", "text" ]
SELECT "pole_position" FROM indy_car_1989 WHERE "rnd" = '12'
dev
wikisql
How many reports were the for the cleveland burke lakefront airport circut?
indy_car_1989
[ "rnd", "race_name", "circuit", "city_location", "date", "pole_position", "winning_driver", "winning_team", "report" ]
[ "text", "text", "text", "text", "text", "text", "text", "text", "text" ]
SELECT COUNT("report") FROM indy_car_1989 WHERE "circuit" = 'Cleveland Burke Lakefront Airport'
dev
wikisql
How many winning drivers were the for the rnd equalling 5?
indy_car_1989
[ "rnd", "race_name", "circuit", "city_location", "date", "pole_position", "winning_driver", "winning_team", "report" ]
[ "text", "text", "text", "text", "text", "text", "text", "text", "text" ]
SELECT COUNT("winning_driver") FROM indy_car_1989 WHERE "rnd" = '5'
dev
wikisql
The race tony bettenhausen 200 has what smallest rd?
indycar_1981
[ "rd", "name", "pole_position", "fastest_lap", "winning_driver", "winning_team", "report" ]
[ "real", "text", "text", "text", "text", "text", "text" ]
SELECT MIN("rd") FROM indycar_1981 WHERE "name" = 'Tony Bettenhausen 200'
dev
wikisql
The winning team of the race, los angeles times 500 is who?
indycar_1981
[ "rd", "name", "pole_position", "fastest_lap", "winning_driver", "winning_team", "report" ]
[ "real", "text", "text", "text", "text", "text", "text" ]
SELECT "winning_team" FROM indycar_1981 WHERE "name" = 'Los Angeles Times 500'
dev
wikisql
How many winning drivers in the kraco twin 125 (r2) race were there?
indycar_1981
[ "rd", "name", "pole_position", "fastest_lap", "winning_driver", "winning_team", "report" ]
[ "real", "text", "text", "text", "text", "text", "text" ]
SELECT COUNT("winning_driver") FROM indycar_1981 WHERE "name" = 'Kraco Twin 125 (R2)'
dev
wikisql
What are the races that johnny rutherford has won?
indycar_1981
[ "rd", "name", "pole_position", "fastest_lap", "winning_driver", "winning_team", "report" ]
[ "real", "text", "text", "text", "text", "text", "text" ]
SELECT "name" FROM indycar_1981 WHERE "winning_driver" = 'Johnny Rutherford'
dev
wikisql
How many fastest laps were there for a rd that equals 10?
indycar_1981
[ "rd", "name", "pole_position", "fastest_lap", "winning_driver", "winning_team", "report" ]
[ "real", "text", "text", "text", "text", "text", "text" ]
SELECT COUNT("fastest_lap") FROM indycar_1981 WHERE "rd" = 10
dev
wikisql
What is the license award date for North East England?
digital_radio_uk
[ "region", "operator", "licence_award_date", "on_air_date", "closure_date" ]
[ "text", "text", "text", "text", "text" ]
SELECT "licence_award_date" FROM digital_radio_uk WHERE "region" = 'North East England'
dev
wikisql
What is the percentage of growth in 2000-2008 in ethiopia?
africa_internet_growth
[ "nation", "population_thousands", "internet_subscriptions_2000_thousands_of_users", "internet_subscriptions_2008_thousands_of_users", "growth_2000_2008", "internet_users" ]
[ "text", "real", "real", "real", "real", "real" ]
SELECT "growth_2000_2008" FROM africa_internet_growth WHERE "nation" = 'Ethiopia'
dev
wikisql
Name the total number of percentage growth 2000-2008 of uganda?
africa_internet_growth
[ "nation", "population_thousands", "internet_subscriptions_2000_thousands_of_users", "internet_subscriptions_2008_thousands_of_users", "growth_2000_2008", "internet_users" ]
[ "text", "real", "real", "real", "real", "real" ]
SELECT COUNT("growth_2000_2008") FROM africa_internet_growth WHERE "nation" = 'Uganda'
dev
wikisql
What is the maximum percentage grown 2000-2008 in burundi
africa_internet_growth
[ "nation", "population_thousands", "internet_subscriptions_2000_thousands_of_users", "internet_subscriptions_2008_thousands_of_users", "growth_2000_2008", "internet_users" ]
[ "text", "real", "real", "real", "real", "real" ]
SELECT MAX("growth_2000_2008") FROM africa_internet_growth WHERE "nation" = 'Burundi'
dev
wikisql
Provide me with the names of all the villages (German) that has 76.3% of Slovenes in 1951.
village_slovene_stats
[ "village_german", "village_slovenian", "number_of_people_1991", "percent_of_slovenes_1991", "percent_of_slovenes_1951" ]
[ "text", "text", "real", "text", "text" ]
SELECT "village_german" FROM village_slovene_stats WHERE "percent_of_slovenes_1951" = '76.3%'
dev
wikisql
Give me the minimum number of people in 1991 with 92.5% of Slovenes in 1991.
village_slovene_stats
[ "village_german", "village_slovenian", "number_of_people_1991", "percent_of_slovenes_1991", "percent_of_slovenes_1951" ]
[ "text", "text", "real", "text", "text" ]
SELECT MIN("number_of_people_1991") FROM village_slovene_stats WHERE "percent_of_slovenes_1991" = '92.5%'
dev
wikisql
Provide me with the name of all the village (German) that are part of the village (Slovenian) with sele srednji kot.
village_slovene_stats
[ "village_german", "village_slovenian", "number_of_people_1991", "percent_of_slovenes_1991", "percent_of_slovenes_1951" ]
[ "text", "text", "real", "text", "text" ]
SELECT "village_german" FROM village_slovene_stats WHERE "village_slovenian" = 'Sele Srednji Kot'
dev
wikisql
Provide me with the name of all the village (German) that are part of the village (Slovenian) with sele borovnica.
village_slovene_stats
[ "village_german", "village_slovenian", "number_of_people_1991", "percent_of_slovenes_1991", "percent_of_slovenes_1951" ]
[ "text", "text", "real", "text", "text" ]
SELECT "village_german" FROM village_slovene_stats WHERE "village_slovenian" = 'Sele Borovnica'
dev
wikisql
Provide me with the name of the village (German) where there is 96.9% Slovenes in 1951.
village_slovene_stats
[ "village_german", "village_slovenian", "number_of_people_1991", "percent_of_slovenes_1991", "percent_of_slovenes_1951" ]
[ "text", "text", "real", "text", "text" ]
SELECT "village_german" FROM village_slovene_stats WHERE "percent_of_slovenes_1951" = '96.9%'
dev
wikisql
Provide with the names of the village (German) that is part of village (Slovenian) with sele srednji kot.
village_slovene_stats
[ "village_german", "village_slovenian", "number_of_people_1991", "percent_of_slovenes_1991", "percent_of_slovenes_1951" ]
[ "text", "text", "real", "text", "text" ]
SELECT "village_german" FROM village_slovene_stats WHERE "village_slovenian" = 'Sele Srednji Kot'
dev
wikisql
What was the score of the game on November 12?
raptors_game_stats
[ "game", "date", "team", "score", "high_points", "high_rebounds", "high_assists", "location_attendance", "record" ]
[ "real", "text", "text", "text", "text", "text", "text", "text", "text" ]
SELECT "score" FROM raptors_game_stats WHERE "date" = 'November 12'
dev
wikisql
Who had high assists when they played against San Antonio?
raptors_game_stats
[ "game", "date", "team", "score", "high_points", "high_rebounds", "high_assists", "location_attendance", "record" ]
[ "real", "text", "text", "text", "text", "text", "text", "text", "text" ]
SELECT "high_assists" FROM raptors_game_stats WHERE "team" = 'San Antonio'
dev
wikisql
Who scored the most points in game 4?
raptors_game_stats
[ "game", "date", "team", "score", "high_points", "high_rebounds", "high_assists", "location_attendance", "record" ]
[ "real", "text", "text", "text", "text", "text", "text", "text", "text" ]
SELECT "high_points" FROM raptors_game_stats WHERE "game" = 4
dev
wikisql
Where was the game on November 20?
raptors_game_stats
[ "game", "date", "team", "score", "high_points", "high_rebounds", "high_assists", "location_attendance", "record" ]
[ "real", "text", "text", "text", "text", "text", "text", "text", "text" ]
SELECT "location_attendance" FROM raptors_game_stats WHERE "date" = 'November 20'
dev
wikisql
The canadian airdate of 11 february 2008 applied to what series number?
episode_data
[ "no_in_season", "no_in_series", "title", "canadian_airdate", "us_airdate", "production_code" ]
[ "real", "real", "text", "text", "text", "real" ]
SELECT COUNT("no_in_series") FROM episode_data WHERE "canadian_airdate" = '11 February 2008'
dev
wikisql
The U.S. airdate of 4 april 2008 had a production code of what?
episode_data
[ "no_in_season", "no_in_series", "title", "canadian_airdate", "us_airdate", "production_code" ]
[ "real", "real", "text", "text", "text", "real" ]
SELECT MAX("production_code") FROM episode_data WHERE "us_airdate" = '4 April 2008'
dev
wikisql
The episode titled "don't stop believin'" was what highest number of the season?
episode_data
[ "no_in_season", "no_in_series", "title", "canadian_airdate", "us_airdate", "production_code" ]
[ "real", "real", "text", "text", "text", "real" ]
SELECT MAX("no_in_season") FROM episode_data WHERE "title" = '"Don''t Stop Believin''"'
dev
wikisql
The U.S. airdate of 8 august 2008 also had canadian airdates of what?
episode_data
[ "no_in_season", "no_in_series", "title", "canadian_airdate", "us_airdate", "production_code" ]
[ "real", "real", "text", "text", "text", "real" ]
SELECT "canadian_airdate" FROM episode_data WHERE "us_airdate" = '8 August 2008'
dev
wikisql
The canadian airdate of 17 march 2008 had how many numbers in the season?
episode_data
[ "no_in_season", "no_in_series", "title", "canadian_airdate", "us_airdate", "production_code" ]
[ "real", "real", "text", "text", "text", "real" ]
SELECT COUNT("no_in_season") FROM episode_data WHERE "canadian_airdate" = '17 March 2008'
dev
wikisql
For the episode(s) aired in the U.S. on 4 april 2008, what were the names?
episode_data
[ "no_in_season", "no_in_series", "title", "canadian_airdate", "us_airdate", "production_code" ]
[ "real", "real", "text", "text", "text", "real" ]
SELECT "title" FROM episode_data WHERE "us_airdate" = '4 April 2008'
dev
wikisql
Who directed the episode "Great Sexpectations (2)"?
melrose_place_episodes
[ "no_in_series", "no_in_season", "title", "director", "writer_s", "original_air_date", "production_code" ]
[ "real", "real", "text", "text", "text", "text", "text" ]
SELECT "director" FROM melrose_place_episodes WHERE "title" = '"Great Sexpectations (2)"'
dev
wikisql
Which player from the 2004 CFL draft attended Wilfrid Laurier?
cfl_draft_2004
[ "pick", "cfl_team", "player", "position", "college" ]
[ "real", "text", "text", "text", "text" ]
SELECT "player" FROM cfl_draft_2004 WHERE "college" = 'Wilfrid Laurier'
dev
wikisql
What position does Christian Leibl-Cote play?
cfl_draft_2004
[ "pick", "cfl_team", "player", "position", "college" ]
[ "real", "text", "text", "text", "text" ]
SELECT "position" FROM cfl_draft_2004 WHERE "player" = 'Christian Leibl-Cote'
dev
wikisql
What is the pick number for Northwestern college?
cfl_draft_2004
[ "pick", "cfl_team", "player", "position", "college" ]
[ "real", "text", "text", "text", "text" ]
SELECT MAX("pick") FROM cfl_draft_2004 WHERE "college" = 'Northwestern'
dev
wikisql
How many foreigners in percentage terms had a population of 4.911?
frankfurt_districts
[ "no", "city_district_stadtteil", "area_in_km", "population", "foreign_nationals", "foreign_nationals_in", "area_district_ortsbezirk" ]
[ "text", "text", "text", "text", "text", "text", "text" ]
SELECT COUNT("foreign_nationals_in") FROM frankfurt_districts WHERE "population" = '4.911'
dev
wikisql
What is the number of the city district of stadtteil where foreigners are 5.162?
frankfurt_districts
[ "no", "city_district_stadtteil", "area_in_km", "population", "foreign_nationals", "foreign_nationals_in", "area_district_ortsbezirk" ]
[ "text", "text", "text", "text", "text", "text", "text" ]
SELECT COUNT("city_district_stadtteil") FROM frankfurt_districts WHERE "foreign_nationals" = '5.162'
dev
wikisql
What is the city where the number is 47?
frankfurt_districts
[ "no", "city_district_stadtteil", "area_in_km", "population", "foreign_nationals", "foreign_nationals_in", "area_district_ortsbezirk" ]
[ "text", "text", "text", "text", "text", "text", "text" ]
SELECT "city_district_stadtteil" FROM frankfurt_districts WHERE "no" = '47'
dev
wikisql
Which leagues have Raiders as their mascot?
northern_4a_schools
[ "school", "mascot", "location", "league", "enrollment" ]
[ "text", "text", "text", "text", "real" ]
SELECT "league" FROM northern_4a_schools WHERE "mascot" = 'Raiders'
dev
wikisql
Which leagues is the Galena school in?
northern_4a_schools
[ "school", "mascot", "location", "league", "enrollment" ]
[ "text", "text", "text", "text", "real" ]
SELECT "league" FROM northern_4a_schools WHERE "school" = 'Galena'
dev
wikisql
What city and state is the Lancers mascot located?
northern_4a_schools
[ "school", "mascot", "location", "league", "enrollment" ]
[ "text", "text", "text", "text", "real" ]
SELECT "location" FROM northern_4a_schools WHERE "mascot" = 'Lancers'
dev
wikisql
What city and state are the miners located in?
northern_4a_schools
[ "school", "mascot", "location", "league", "enrollment" ]
[ "text", "text", "text", "text", "real" ]
SELECT "location" FROM northern_4a_schools WHERE "mascot" = 'Miners'
dev
wikisql
Which school has the Raiders as their mascot?
northern_4a_schools
[ "school", "mascot", "location", "league", "enrollment" ]
[ "text", "text", "text", "text", "real" ]
SELECT "school" FROM northern_4a_schools WHERE "mascot" = 'Raiders'
dev
wikisql
Where was the tournament dated nov 3, 2002?
golfer_stats
[ "no", "date", "tournament", "winning_score", "to_par", "margin_of_victory", "runner_s_up" ]
[ "real", "text", "text", "text", "text", "text", "text" ]
SELECT "tournament" FROM golfer_stats WHERE "date" = 'Nov 3, 2002'
dev
wikisql
Where is the margin of victory dated mar 28, 2004?
golfer_stats
[ "no", "date", "tournament", "winning_score", "to_par", "margin_of_victory", "runner_s_up" ]
[ "real", "text", "text", "text", "text", "text", "text" ]
SELECT "margin_of_victory" FROM golfer_stats WHERE "date" = 'Mar 28, 2004'
dev
wikisql
What is the to par dated may 4, 2003?
golfer_stats
[ "no", "date", "tournament", "winning_score", "to_par", "margin_of_victory", "runner_s_up" ]
[ "real", "text", "text", "text", "text", "text", "text" ]
SELECT "to_par" FROM golfer_stats WHERE "date" = 'May 4, 2003'
dev
wikisql
What date were the runner ups pat hurst juli inkster?
golfer_stats
[ "no", "date", "tournament", "winning_score", "to_par", "margin_of_victory", "runner_s_up" ]
[ "real", "text", "text", "text", "text", "text", "text" ]
SELECT "date" FROM golfer_stats WHERE "runner_s_up" = 'Pat Hurst Juli Inkster'
dev
wikisql
what's the total number of final epbeingode count with character being rick stetler
csi_miami_characters
[ "character", "fate", "actor", "first_episode", "final_episode", "duration", "final_episode_count" ]
[ "text", "text", "text", "text", "text", "text", "real" ]
SELECT COUNT("final_episode_count") FROM csi_miami_characters WHERE "character" = 'Rick Stetler'
dev
wikisql
what are all the actor where first episode is "ambush"
csi_miami_characters
[ "character", "fate", "actor", "first_episode", "final_episode", "duration", "final_episode_count" ]
[ "text", "text", "text", "text", "text", "text", "real" ]
SELECT "actor" FROM csi_miami_characters WHERE "first_episode" = '"Ambush"'
dev
wikisql
what's the character with fate being deceased: knife wound
csi_miami_characters
[ "character", "fate", "actor", "first_episode", "final_episode", "duration", "final_episode_count" ]
[ "text", "text", "text", "text", "text", "text", "real" ]
SELECT "character" FROM csi_miami_characters WHERE "fate" = 'Deceased: Knife Wound'
dev
wikisql
what's the total number of final epbeingode count with first epbeingode being "l.a."
csi_miami_characters
[ "character", "fate", "actor", "first_episode", "final_episode", "duration", "final_episode_count" ]
[ "text", "text", "text", "text", "text", "text", "real" ]
SELECT COUNT("final_episode_count") FROM csi_miami_characters WHERE "first_episode" = '"L.A."'
dev
wikisql
what's the actor with character being judge joseph ratner
csi_miami_characters
[ "character", "fate", "actor", "first_episode", "final_episode", "duration", "final_episode_count" ]
[ "text", "text", "text", "text", "text", "text", "real" ]
SELECT "actor" FROM csi_miami_characters WHERE "character" = 'Judge Joseph Ratner'
dev
wikisql
what's the first epbeingode with final epbeingode being "rio"
csi_miami_characters
[ "character", "fate", "actor", "first_episode", "final_episode", "duration", "final_episode_count" ]
[ "text", "text", "text", "text", "text", "text", "real" ]
SELECT "first_episode" FROM csi_miami_characters WHERE "final_episode" = '"Rio"'
dev
wikisql
Which team was the second semi finalist in 2007?
scrhl_game_results
[ "year", "champion", "score", "runner_up", "location", "semi_finalist_1", "semi_finalist_2" ]
[ "real", "text", "text", "text", "text", "text", "text" ]
SELECT "semi_finalist_2" FROM scrhl_game_results WHERE "year" = 2007
dev
wikisql
How many teams were listed as runner up in 2005 and there the first semi finalist was Western Carolina?
scrhl_game_results
[ "year", "champion", "score", "runner_up", "location", "semi_finalist_1", "semi_finalist_2" ]
[ "real", "text", "text", "text", "text", "text", "text" ]
SELECT COUNT("runner_up") FROM scrhl_game_results WHERE "semi_finalist_1" = 'Western Carolina' AND "year" = 2005
dev
wikisql
End of preview. Expand in Data Studio

WikiSQL Text-to-SQL (execution-ready)

A cleaned, execution-ready repackaging of WikiSQL for text-to-SQL fine-tuning and execution-accuracy evaluation. Each example pairs a natural-language question with a gold SQL query over a single-table schema — and every split ships a real SQLite database so predicted SQL can be run and compared by result set (not string-matched).

Splits

Split Examples
train 55,339
dev 8,263
test 15,519

Columns

Column Type Description
question string Natural-language question
table_name string Concise table name
columns list[string] Column names (snake_case)
column_types list[string] Per-column type: text or real
gold_sql string Gold SQL — the training target and the query to execute
db_id string Split name (the DB the example belongs to)
source string Origin dataset (wikisql)

Databases (for execution accuracy)

Each split has a SQLite DB at dbs/{split}.db with real table/column names, so both gold and predicted real-name SQL execute directly. Text columns are COLLATE U_NOCASE (Unicode-aware, casefold) and numeric columns are REAL.

⚠️ You must register the U_NOCASE collation before querying, or SQLite raises no such collation sequence: U_NOCASE. It's baked into the table schema.

import sqlite3
from datasets import load_dataset
from huggingface_hub import hf_hub_download

REPO = "mohamed-ahmed-58059/wikisql-text2sql"
ds = load_dataset(REPO, split="dev")
db = hf_hub_download(REPO, "dbs/dev.db", repo_type="dataset")

con = sqlite3.connect(db)
con.create_collation("U_NOCASE", lambda a, b: (a.casefold() > b.casefold()) - (a.casefold() < b.casefold()))

ex = ds[0]
print(ex["question"])
print(ex["gold_sql"])
print(con.execute(ex["gold_sql"]).fetchall())   # execute the gold query

How it was built

Derived from WikiSQL: table names made concise, columns normalized to snake_case, the WikiSQL logical forms decoded into clean real-name SQL, and a hardened SQLite DB built per split (NOCASE text, comma-stripped REAL numerics) so execution-accuracy comparison is robust to cosmetic differences. Full pipeline: github.com/mohamed-ahmed-58059/hf-ml-platform-text2sql.finetune.

Fine-tuned model

A QLoRA fine-tune of Llama-3.1-8B trained on this data reaches 0.915 execution accuracy on the dev split: Llama-3.1-8B-text2sql-wikisql.

License & attribution

Derived from WikiSQL (Salesforce), released under the BSD 3-Clause License. If you use this data, please cite the original work:

Victor Zhong, Caiming Xiong, Richard Socher. Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learning. arXiv:1709.00103, 2017.

Downloads last month
60

Models trained or fine-tuned on mohamed-ahmed-58059/wikisql-text2sql

Paper for mohamed-ahmed-58059/wikisql-text2sql