instruction stringlengths 67 299 | input stringlengths 88 550 | output stringlengths 32 484 |
|---|---|---|
Write a SQL query that answers the following question: What is the torque of the engine with a type 16 valves dohc and a code k4m hi-flex? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_99 (torque VARCHAR, type VARCHAR, code VARCHAR) | SELECT torque FROM table_name_99 WHERE type = "16 valves dohc" AND code = "k4m hi-flex" |
Write a SQL query that answers the following question: Who had the highest assists on the November 13 game? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_56 (high_assists VARCHAR, date VARCHAR) | SELECT high_assists FROM table_name_56 WHERE date = "november 13" |
Write a SQL query that answers the following question: What is the most recent date for a singles final with the score of 1–6, 4–6, 5–7? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_77 (date INTEGER, score_in_the_final VARCHAR) | SELECT MAX(date) FROM table_name_77 WHERE score_in_the_final = "1–6, 4–6, 5–7" |
Write a SQL query that answers the following question: What was the championship that had final score of 6–2, 5–7, 6–4, 6–2 and was on a clay surface? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_41 (championship VARCHAR, surface VARCHAR, score_in_the_final VARCHAR) | SELECT championship FROM table_name_41 WHERE surface = "clay" AND score_in_the_final = "6–2, 5–7, 6–4, 6–2" |
Write a SQL query that answers the following question: What was the score in the final, that Víctor Pecci was the opponent and winner after 1984? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_92 (score_in_the_final VARCHAR, opponent_in_the_final VARCHAR, date VARCHAR, outcome VARCHAR) | SELECT score_in_the_final FROM table_name_92 WHERE date > 1984 AND outcome = "winner" AND opponent_in_the_final = "víctor pecci" |
Write a SQL query that answers the following question: Which championship had a score in the final of 3–6, 6–4, 5–7? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_79 (championship VARCHAR, score_in_the_final VARCHAR) | SELECT championship FROM table_name_79 WHERE score_in_the_final = "3–6, 6–4, 5–7" |
Write a SQL query that answers the following question: What is the grid total when there are 37 laps? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_57 (grid VARCHAR, laps VARCHAR) | SELECT COUNT(grid) FROM table_name_57 WHERE laps = 37 |
Write a SQL query that answers the following question: What constructor has a grid less than 13 with under 9 laps? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_19 (constructor VARCHAR, grid VARCHAR, laps VARCHAR) | SELECT constructor FROM table_name_19 WHERE grid < 13 AND laps < 9 |
Write a SQL query that answers the following question: What year was the Competition of World Junior Championships with a 20th (qf) position? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_18 (year INTEGER, competition VARCHAR, position VARCHAR) | SELECT AVG(year) FROM table_name_18 WHERE competition = "world junior championships" AND position = "20th (qf)" |
Write a SQL query that answers the following question: What was the notes of the 400 m event before 2004 with a position of 12th (h)? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_69 (notes VARCHAR, position VARCHAR, event VARCHAR, year VARCHAR) | SELECT notes FROM table_name_69 WHERE event = "400 m" AND year < 2004 AND position = "12th (h)" |
Write a SQL query that answers the following question: Which venue had a note of 3:34.88 after 2003? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_32 (venue VARCHAR, year VARCHAR, notes VARCHAR) | SELECT venue FROM table_name_32 WHERE year > 2003 AND notes = "3:34.88" |
Write a SQL query that answers the following question: What were the notes of the All-Africa Games before 2007? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_41 (notes VARCHAR, competition VARCHAR, year VARCHAR) | SELECT notes FROM table_name_41 WHERE competition = "all-africa games" AND year < 2007 |
Write a SQL query that answers the following question: Which event in 2007 had a position of 5th? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_87 (event VARCHAR, year VARCHAR, position VARCHAR) | SELECT event FROM table_name_87 WHERE year = 2007 AND position = "5th" |
Write a SQL query that answers the following question: How many attended the game on 12/17 with stephen jackson as the leading scorer? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_45 (attendance INTEGER, leading_scorer VARCHAR, date VARCHAR) | SELECT SUM(attendance) FROM table_name_45 WHERE leading_scorer = "stephen jackson" AND date = "12/17" |
Write a SQL query that answers the following question: WHAT WAS THE SCORE IN THE FINAL PLAYED AGAINST JOSE CHECA-CALVO IN THE SANT CUGAT TOURNAMENT ? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_80 (score VARCHAR, tournament VARCHAR, opponent_in_the_final VARCHAR) | SELECT score FROM table_name_80 WHERE tournament = "sant cugat" AND opponent_in_the_final = "jose checa-calvo" |
Write a SQL query that answers the following question: WHAT WAS THE SCORE IN THE FINAL AGAINST RABIE CHAKI? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_92 (score VARCHAR, opponent_in_the_final VARCHAR) | SELECT score FROM table_name_92 WHERE opponent_in_the_final = "rabie chaki" |
Write a SQL query that answers the following question: What was the away team's score when Collingwood was the home team? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_17 (away_team VARCHAR, home_team VARCHAR) | SELECT away_team AS score FROM table_name_17 WHERE home_team = "collingwood" |
Write a SQL query that answers the following question: Who was the home team for the game played at Victoria Park? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_87 (home_team VARCHAR, venue VARCHAR) | SELECT home_team FROM table_name_87 WHERE venue = "victoria park" |
Write a SQL query that answers the following question: Who was the home team when Fitzroy was the away team? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_33 (home_team VARCHAR, away_team VARCHAR) | SELECT home_team FROM table_name_33 WHERE away_team = "fitzroy" |
Write a SQL query that answers the following question: Who was the home team for the game played at Lake Oval? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_77 (home_team VARCHAR, venue VARCHAR) | SELECT home_team FROM table_name_77 WHERE venue = "lake oval" |
Write a SQL query that answers the following question: Who was the opponent in the championship in Johannesburg, South Africa? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_63 (opponent_in_the_final VARCHAR, championship VARCHAR) | SELECT opponent_in_the_final FROM table_name_63 WHERE championship = "johannesburg, south africa" |
Write a SQL query that answers the following question: What is the lowest amount of wins a manager with more than 0.526 pct., ranked higher than 37, and 947 losses has? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_8 (wins INTEGER, losses VARCHAR, pct VARCHAR, rank VARCHAR) | SELECT MIN(wins) FROM table_name_8 WHERE pct > 0.526 AND rank < 37 AND losses = 947 |
Write a SQL query that answers the following question: I want the total number of people in the crowd for essendon home team | The relevant table was constructed using the following SQL : CREATE TABLE table_name_31 (crowd VARCHAR, home_team VARCHAR) | SELECT COUNT(crowd) FROM table_name_31 WHERE home_team = "essendon" |
Write a SQL query that answers the following question: How many grids have 102 laps and a Time/Retired of + 6.18? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_64 (grid VARCHAR, laps VARCHAR, time_retired VARCHAR) | SELECT COUNT(grid) FROM table_name_64 WHERE laps > 102 AND time_retired = "+ 6.18" |
Write a SQL query that answers the following question: How many laps did innes ireland drive with a grid higher than 11? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_29 (laps INTEGER, driver VARCHAR, grid VARCHAR) | SELECT SUM(laps) FROM table_name_29 WHERE driver = "innes ireland" AND grid > 11 |
Write a SQL query that answers the following question: What is the average grid that has a Constructor of brm, tony maggs, and a Laps larger than 102? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_16 (grid INTEGER, laps VARCHAR, constructor VARCHAR, driver VARCHAR) | SELECT AVG(grid) FROM table_name_16 WHERE constructor = "brm" AND driver = "tony maggs" AND laps > 102 |
Write a SQL query that answers the following question: I want the score for 23 july 1992 | The relevant table was constructed using the following SQL : CREATE TABLE table_name_86 (score VARCHAR, date VARCHAR) | SELECT score FROM table_name_86 WHERE date = "23 july 1992" |
Write a SQL query that answers the following question: I want the venue for 23 july 1992 | The relevant table was constructed using the following SQL : CREATE TABLE table_name_64 (venue VARCHAR, date VARCHAR) | SELECT venue FROM table_name_64 WHERE date = "23 july 1992" |
Write a SQL query that answers the following question: What is the Time/Retired that has a Grid smaller than 8, 73 laps, and a Constructor of williams - bmw? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_1 (time_retired VARCHAR, constructor VARCHAR, grid VARCHAR, laps VARCHAR) | SELECT time_retired FROM table_name_1 WHERE grid < 8 AND laps = 73 AND constructor = "williams - bmw" |
Write a SQL query that answers the following question: On what date was Richmond playing as an away team? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_32 (date VARCHAR, away_team VARCHAR) | SELECT date FROM table_name_32 WHERE away_team = "richmond" |
Write a SQL query that answers the following question: What is the crowd size for Victoria park? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_99 (crowd VARCHAR, venue VARCHAR) | SELECT crowd FROM table_name_99 WHERE venue = "victoria park" |
Write a SQL query that answers the following question: What is the average crowd size for princes park? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_97 (crowd INTEGER, venue VARCHAR) | SELECT AVG(crowd) FROM table_name_97 WHERE venue = "princes park" |
Write a SQL query that answers the following question: Name the transfer wind for giuly | The relevant table was constructed using the following SQL : CREATE TABLE table_name_15 (transfer_window VARCHAR, name VARCHAR) | SELECT transfer_window FROM table_name_15 WHERE name = "giuly" |
Write a SQL query that answers the following question: Name the transfer fee for transfer status for fra | The relevant table was constructed using the following SQL : CREATE TABLE table_name_24 (transfer_fee VARCHAR, status VARCHAR, country VARCHAR) | SELECT transfer_fee FROM table_name_24 WHERE status = "transfer" AND country = "fra" |
Write a SQL query that answers the following question: Name the status for belletti | The relevant table was constructed using the following SQL : CREATE TABLE table_name_8 (status VARCHAR, name VARCHAR) | SELECT status FROM table_name_8 WHERE name = "belletti" |
Write a SQL query that answers the following question: Name the moving to for fra | The relevant table was constructed using the following SQL : CREATE TABLE table_name_22 (moving_to VARCHAR, country VARCHAR) | SELECT moving_to FROM table_name_22 WHERE country = "fra" |
Write a SQL query that answers the following question: Name the transfer window of realmadrid | The relevant table was constructed using the following SQL : CREATE TABLE table_name_12 (transfer_window VARCHAR, moving_to VARCHAR) | SELECT transfer_window FROM table_name_12 WHERE moving_to = "realmadrid" |
Write a SQL query that answers the following question: Name the country moving to chelsea | The relevant table was constructed using the following SQL : CREATE TABLE table_name_24 (country VARCHAR, moving_to VARCHAR) | SELECT country FROM table_name_24 WHERE moving_to = "chelsea" |
Write a SQL query that answers the following question: Who was the leading scorer of the game on 20 February 2008? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_44 (leading_scorer VARCHAR, date VARCHAR) | SELECT leading_scorer FROM table_name_44 WHERE date = "20 february 2008" |
Write a SQL query that answers the following question: What is the visitor team of the game with Rudy Gay (23) as the leading scorer? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_99 (visitor VARCHAR, leading_scorer VARCHAR) | SELECT visitor FROM table_name_99 WHERE leading_scorer = "rudy gay (23)" |
Write a SQL query that answers the following question: What is the home team of the game where the Grizzlies were the visitor team and Rudy Gay (21) was the leading scorer? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_83 (home VARCHAR, visitor VARCHAR, leading_scorer VARCHAR) | SELECT home FROM table_name_83 WHERE visitor = "grizzlies" AND leading_scorer = "rudy gay (21)" |
Write a SQL query that answers the following question: What is the record of the game on 5 February 2008? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_87 (record VARCHAR, date VARCHAR) | SELECT record FROM table_name_87 WHERE date = "5 february 2008" |
Write a SQL query that answers the following question: tell me the writer of production code ad1d09. | The relevant table was constructed using the following SQL : CREATE TABLE table_name_33 (written_by VARCHAR, production_code VARCHAR) | SELECT written_by FROM table_name_33 WHERE production_code = "ad1d09" |
Write a SQL query that answers the following question: tell me the director of the production code ad1d02. | The relevant table was constructed using the following SQL : CREATE TABLE table_name_32 (directed_by VARCHAR, production_code VARCHAR) | SELECT directed_by FROM table_name_32 WHERE production_code = "ad1d02" |
Write a SQL query that answers the following question: Which team has a Reg GP of 0, a pick number under 136 with a player named Regan Darby? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_85 (team__league_ VARCHAR, player VARCHAR, reg_gp VARCHAR, pick__number VARCHAR) | SELECT team__league_ FROM table_name_85 WHERE reg_gp = 0 AND pick__number < 136 AND player = "regan darby" |
Write a SQL query that answers the following question: What planet orbits in 3.23 days? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_50 (planet VARCHAR, orbital_period VARCHAR) | SELECT planet FROM table_name_50 WHERE orbital_period = "3.23 days" |
Write a SQL query that answers the following question: What type of planet has a radial velocity of 45.2 m/s? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_56 (planet VARCHAR, radial_velocity__m_s_ INTEGER) | SELECT planet AS Type FROM table_name_56 WHERE radial_velocity__m_s_ > 45.2 |
Write a SQL query that answers the following question: What type of planet has a semimajor axis of 0.07 AU? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_51 (planet VARCHAR, semimajor_axis___au__ VARCHAR) | SELECT planet AS Type FROM table_name_51 WHERE semimajor_axis___au__ = 0.07 |
Write a SQL query that answers the following question: What is the city where the Telstra Dome is? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_83 (city VARCHAR, stadium VARCHAR) | SELECT city FROM table_name_83 WHERE stadium = "telstra dome" |
Write a SQL query that answers the following question: Name the D 41 which has a D 46 of r 6 | The relevant table was constructed using the following SQL : CREATE TABLE table_name_97 (d_41 VARCHAR, d_46 VARCHAR) | SELECT d_41 FROM table_name_97 WHERE d_46 = "r 6" |
Write a SQL query that answers the following question: Name the D 41 which has a D 43 of r 18 | The relevant table was constructed using the following SQL : CREATE TABLE table_name_45 (d_41 VARCHAR, d_43 VARCHAR) | SELECT d_41 FROM table_name_45 WHERE d_43 = "r 18" |
Write a SQL query that answers the following question: Name the R 52 which has a D 44 of d 44 | The relevant table was constructed using the following SQL : CREATE TABLE table_name_54 (r_52 VARCHAR, d_44 VARCHAR) | SELECT r_52 FROM table_name_54 WHERE d_44 = "d 44" |
Write a SQL query that answers the following question: Name the D 46 which has a D 43 of majority→ | The relevant table was constructed using the following SQL : CREATE TABLE table_name_34 (d_46 VARCHAR, d_43 VARCHAR) | SELECT d_46 FROM table_name_34 WHERE d_43 = "majority→" |
Write a SQL query that answers the following question: Name the D 42 which has a D 46 of r 26 | The relevant table was constructed using the following SQL : CREATE TABLE table_name_6 (d_42 VARCHAR, d_46 VARCHAR) | SELECT d_42 FROM table_name_6 WHERE d_46 = "r 26" |
Write a SQL query that answers the following question: Name the D 42 which has a D 44 of d 44 | The relevant table was constructed using the following SQL : CREATE TABLE table_name_29 (d_42 VARCHAR, d_44 VARCHAR) | SELECT d_42 FROM table_name_29 WHERE d_44 = "d 44" |
Write a SQL query that answers the following question: How many wins did SD Eibar, which played less than 38 games, have? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_24 (wins INTEGER, club VARCHAR, played VARCHAR) | SELECT SUM(wins) FROM table_name_24 WHERE club = "sd eibar" AND played < 38 |
Write a SQL query that answers the following question: What is the highest number of draws a club with less than 20 wins, less than 41 points, and less than 27 goals have? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_56 (draws INTEGER, goals_for VARCHAR, wins VARCHAR, points VARCHAR) | SELECT MAX(draws) FROM table_name_56 WHERE wins < 20 AND points < 41 AND goals_for < 27 |
Write a SQL query that answers the following question: What is the lowest goal difference a club with more than 13 wins, less than 8 losses, and less than 11 draws has? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_81 (goal_difference INTEGER, draws VARCHAR, wins VARCHAR, losses VARCHAR) | SELECT MIN(goal_difference) FROM table_name_81 WHERE wins > 13 AND losses < 8 AND draws < 11 |
Write a SQL query that answers the following question: What is the number of played games a club with more than 71 points and less than 8 losses has? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_50 (played INTEGER, points VARCHAR, losses VARCHAR) | SELECT SUM(played) FROM table_name_50 WHERE points > 71 AND losses < 8 |
Write a SQL query that answers the following question: What is the lowest goal difference a club with 61 goals against and less than 11 draws has? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_94 (goal_difference INTEGER, goals_against VARCHAR, draws VARCHAR) | SELECT MIN(goal_difference) FROM table_name_94 WHERE goals_against = 61 AND draws < 11 |
Write a SQL query that answers the following question: Which Crowd has a Venue of princes park? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_25 (crowd INTEGER, venue VARCHAR) | SELECT MIN(crowd) FROM table_name_25 WHERE venue = "princes park" |
Write a SQL query that answers the following question: Which Away team has a Venue of mcg? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_82 (away_team VARCHAR, venue VARCHAR) | SELECT away_team FROM table_name_82 WHERE venue = "mcg" |
Write a SQL query that answers the following question: Which average Crowd has a Home team of essendon? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_59 (crowd INTEGER, home_team VARCHAR) | SELECT AVG(crowd) FROM table_name_59 WHERE home_team = "essendon" |
Write a SQL query that answers the following question: When was terry cook picked? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_92 (pick INTEGER, player VARCHAR) | SELECT AVG(pick) FROM table_name_92 WHERE player = "terry cook" |
Write a SQL query that answers the following question: What position is todd hammel? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_99 (position VARCHAR, player VARCHAR) | SELECT position FROM table_name_99 WHERE player = "todd hammel" |
Write a SQL query that answers the following question: What is the score of the away team that played Essendon? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_98 (away_team VARCHAR, home_team VARCHAR) | SELECT away_team AS score FROM table_name_98 WHERE home_team = "essendon" |
Write a SQL query that answers the following question: How many people attended the North Melbourne game? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_71 (crowd INTEGER, home_team VARCHAR) | SELECT AVG(crowd) FROM table_name_71 WHERE home_team = "north melbourne" |
Write a SQL query that answers the following question: Where did Carlton play? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_9 (venue VARCHAR, away_team VARCHAR) | SELECT venue FROM table_name_9 WHERE away_team = "carlton" |
Write a SQL query that answers the following question: Which team played at VFL Park? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_95 (home_team VARCHAR, venue VARCHAR) | SELECT home_team FROM table_name_95 WHERE venue = "vfl park" |
Write a SQL query that answers the following question: Which player has a College of arizona? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_83 (player VARCHAR, college VARCHAR) | SELECT player FROM table_name_83 WHERE college = "arizona" |
Write a SQL query that answers the following question: Which school has a Hometown of phoenix, az? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_39 (school VARCHAR, hometown VARCHAR) | SELECT school FROM table_name_39 WHERE hometown = "phoenix, az" |
Write a SQL query that answers the following question: Which NBA draft has a School of huntington high school? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_57 (nba_draft VARCHAR, school VARCHAR) | SELECT nba_draft FROM table_name_57 WHERE school = "huntington high school" |
Write a SQL query that answers the following question: Which NBA draft has a School of st. mary's high school? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_91 (nba_draft VARCHAR, school VARCHAR) | SELECT nba_draft FROM table_name_91 WHERE school = "st. mary's high school" |
Write a SQL query that answers the following question: Which school has a Player of donte greene? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_6 (school VARCHAR, player VARCHAR) | SELECT school FROM table_name_6 WHERE player = "donte greene" |
Write a SQL query that answers the following question: For R. Magjistari scores over 12, what is the highest number of points? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_33 (points INTEGER, r_magjistari INTEGER) | SELECT MAX(points) FROM table_name_33 WHERE r_magjistari > 12 |
Write a SQL query that answers the following question: For R. Magjistari scores under 6, D. Tukiqi scores of 6, and ranks under 5, what is the average A. Krajka score? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_60 (a_krajka INTEGER, rank VARCHAR, r_magjistari VARCHAR, d_tukiqi VARCHAR) | SELECT AVG(a_krajka) FROM table_name_60 WHERE r_magjistari < 6 AND d_tukiqi = 6 AND rank < 5 |
Write a SQL query that answers the following question: Where did the Vitória de Setúbal club place in the 2006-2007 season? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_13 (club VARCHAR) | SELECT 2006 AS _2007_season FROM table_name_13 WHERE club = "vitória de setúbal" |
Write a SQL query that answers the following question: Name the sum of Long for yards less than 197 and players of matt nagy | The relevant table was constructed using the following SQL : CREATE TABLE table_name_12 (long INTEGER, yards VARCHAR, player VARCHAR) | SELECT SUM(long) FROM table_name_12 WHERE yards < 197 AND player = "matt nagy" |
Write a SQL query that answers the following question: Who was the visitor team in tampa bay? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_26 (visitor VARCHAR, home VARCHAR) | SELECT visitor FROM table_name_26 WHERE home = "tampa bay" |
Write a SQL query that answers the following question: Who had a 32-29-8 record at home? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_55 (home VARCHAR, record VARCHAR) | SELECT home FROM table_name_55 WHERE record = "32-29-8" |
Write a SQL query that answers the following question: Who had a 33-30-8 record at home? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_99 (home VARCHAR, record VARCHAR) | SELECT home FROM table_name_99 WHERE record = "33-30-8" |
Write a SQL query that answers the following question: What was the home teams score when North Melbourne played as the away team? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_15 (home_team VARCHAR, away_team VARCHAR) | SELECT home_team AS score FROM table_name_15 WHERE away_team = "north melbourne" |
Write a SQL query that answers the following question: Who was the away team at Windy Hill? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_11 (away_team VARCHAR, venue VARCHAR) | SELECT away_team FROM table_name_11 WHERE venue = "windy hill" |
Write a SQL query that answers the following question: Where did Fitzroy play as the home team? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_22 (venue VARCHAR, home_team VARCHAR) | SELECT venue FROM table_name_22 WHERE home_team = "fitzroy" |
Write a SQL query that answers the following question: Who was away team at the home game of south melbourne? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_99 (away_team VARCHAR, home_team VARCHAR) | SELECT away_team FROM table_name_99 WHERE home_team = "south melbourne" |
Write a SQL query that answers the following question: What did the away team score when they visited south melbourne? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_26 (away_team VARCHAR, home_team VARCHAR) | SELECT away_team AS score FROM table_name_26 WHERE home_team = "south melbourne" |
Write a SQL query that answers the following question: What is the highest crowd with north melbourne as away team? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_10 (crowd INTEGER, away_team VARCHAR) | SELECT MAX(crowd) FROM table_name_10 WHERE away_team = "north melbourne" |
Write a SQL query that answers the following question: Which venue has a Home team of south melbourne? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_88 (venue VARCHAR, home_team VARCHAR) | SELECT venue FROM table_name_88 WHERE home_team = "south melbourne" |
Write a SQL query that answers the following question: What home score has an Away team of fitzroy? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_82 (home_team VARCHAR, away_team VARCHAR) | SELECT home_team AS score FROM table_name_82 WHERE away_team = "fitzroy" |
Write a SQL query that answers the following question: Which home team has a Venue of corio oval? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_61 (home_team VARCHAR, venue VARCHAR) | SELECT home_team FROM table_name_61 WHERE venue = "corio oval" |
Write a SQL query that answers the following question: Which team has an Away team of carlton? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_58 (home_team VARCHAR, away_team VARCHAR) | SELECT home_team FROM table_name_58 WHERE away_team = "carlton" |
Write a SQL query that answers the following question: Which date has an Away team of richmond? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_21 (date VARCHAR, away_team VARCHAR) | SELECT date FROM table_name_21 WHERE away_team = "richmond" |
Write a SQL query that answers the following question: How many regions have a capital of matanzas and a 2005 population under 670427? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_85 (area__km²_ VARCHAR, capital VARCHAR, population__2005_ VARCHAR) | SELECT COUNT(area__km²_) FROM table_name_85 WHERE capital = "matanzas" AND population__2005_ < 670427 |
Write a SQL query that answers the following question: What is the average area that has a Capital of camagüey, with a Population (%) larger than 7.02? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_25 (area__km²_ INTEGER, capital VARCHAR, population___percentage_ VARCHAR) | SELECT AVG(area__km²_) FROM table_name_25 WHERE capital = "camagüey" AND population___percentage_ > 7.02 |
Write a SQL query that answers the following question: What was the score of the Kings game attended by more than 18,630 people? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_76 (score VARCHAR, attendance INTEGER) | SELECT score FROM table_name_76 WHERE attendance > 18 OFFSET 630 |
Write a SQL query that answers the following question: What was the average attendance for a Kings game when they had a record of 1–5–0? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_92 (attendance INTEGER, record VARCHAR) | SELECT AVG(attendance) FROM table_name_92 WHERE record = "1–5–0" |
Write a SQL query that answers the following question: What team has over 1 tournament title, 0 in the regular season, and 2 total? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_47 (team VARCHAR, total VARCHAR, tournament VARCHAR, regular_season VARCHAR) | SELECT team FROM table_name_47 WHERE tournament > 1 AND regular_season = "0" AND total = 2 |
Write a SQL query that answers the following question: What is the total on average for teams with 3 tournaments? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_8 (total INTEGER, tournament VARCHAR) | SELECT AVG(total) FROM table_name_8 WHERE tournament = 3 |
Write a SQL query that answers the following question: what is the lowest grid when the laps is more than 7 and the driver is rubens barrichello? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_21 (grid INTEGER, laps VARCHAR, driver VARCHAR) | SELECT MIN(grid) FROM table_name_21 WHERE laps > 7 AND driver = "rubens barrichello" |
Write a SQL query that answers the following question: what is the grid when the laps is more than 0, the time/retired is engine and the driver is pedro de la rosa? | The relevant table was constructed using the following SQL : CREATE TABLE table_name_5 (grid VARCHAR, driver VARCHAR, laps VARCHAR, time_retired VARCHAR) | SELECT grid FROM table_name_5 WHERE laps > 0 AND time_retired = "engine" AND driver = "pedro de la rosa" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.