text
stringlengths 354
1.06k
|
---|
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_66 (young_rider_classification VARCHAR, mountains_classification VARCHAR, stage VARCHAR)
Question: What is the young rider classification for jesper worre and stage 3
[/INST]
Here is the SQLite query to answer to the question: What is the young rider classification for jesper worre and stage 3:
```
SELECT young_rider_classification FROM table_name_66 WHERE mountains_classification = "jesper worre" AND stage = "3"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_58 (region VARCHAR, total_gdp__€_bn__ VARCHAR)
Question: What is the Region that has a Total GDP (€ bn ) of €11,745.353?
[/INST]
Here is the SQLite query to answer to the question: What is the Region that has a Total GDP (€ bn ) of €11,745.353?:
```
SELECT region FROM table_name_58 WHERE total_gdp__€_bn__ = "€11,745.353"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_96 (home_team VARCHAR, venue VARCHAR)
Question: What is the score for the home team when the venue is Junction Oval?
[/INST]
Here is the SQLite query to answer to the question: What is the score for the home team when the venue is Junction Oval?:
```
SELECT home_team AS score FROM table_name_96 WHERE venue = "junction oval"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_33 (year INTEGER, team VARCHAR, finish VARCHAR)
Question: What is the total of the year with a Team of johnson city yankees, and a Finish of 6th?
[/INST]
Here is the SQLite query to answer to the question: What is the total of the year with a Team of johnson city yankees, and a Finish of 6th?:
```
SELECT SUM(year) FROM table_name_33 WHERE team = "johnson city yankees" AND finish = "6th"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_82 (player VARCHAR, college VARCHAR)
Question: Which players college was Baylor?
[/INST]
Here is the SQLite query to answer to the question: Which players college was Baylor?:
```
SELECT player FROM table_name_82 WHERE college = "baylor"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_15736385_1 (engine VARCHAR, team VARCHAR)
Question: What engine does Galles Racing use?
[/INST]
Here is the SQLite query to answer to the question: What engine does Galles Racing use?:
```
SELECT engine FROM table_15736385_1 WHERE team = "Galles Racing"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_99 (having__things_ VARCHAR, interacting__settings_ VARCHAR)
Question: Name the having things for privacy, intimate spaces of togetherness
[/INST]
Here is the SQLite query to answer to the question: Name the having things for privacy, intimate spaces of togetherness:
```
SELECT having__things_ FROM table_name_99 WHERE interacting__settings_ = "privacy, intimate spaces of togetherness"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_12 (score VARCHAR, date VARCHAR)
Question: The game played on 6 December 1986 had what score?
[/INST]
Here is the SQLite query to answer to the question: The game played on 6 December 1986 had what score?:
```
SELECT score FROM table_name_12 WHERE date = "6 december 1986"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_23285761_7 (high_assists VARCHAR, high_rebounds VARCHAR)
Question: Who did the high assists in the game where Amar'e Stoudemire (10) did the high rebounds?
[/INST]
Here is the SQLite query to answer to the question: Who did the high assists in the game where Amar'e Stoudemire (10) did the high rebounds?:
```
SELECT high_assists FROM table_23285761_7 WHERE high_rebounds = "Amar'e Stoudemire (10)"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_46 (top_10 INTEGER, wins INTEGER)
Question: What is the highest number of top-10s in events with more than 0 wins?
[/INST]
Here is the SQLite query to answer to the question: What is the highest number of top-10s in events with more than 0 wins?:
```
SELECT MAX(top_10) FROM table_name_46 WHERE wins > 0
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_44 (away_team VARCHAR, venue VARCHAR)
Question: What was the away team at mcg?
[/INST]
Here is the SQLite query to answer to the question: What was the away team at mcg?:
```
SELECT away_team FROM table_name_44 WHERE venue = "mcg"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_12407546_1 (_number INTEGER, riding VARCHAR)
Question: What's the number of the player with 68.46 (1144 pts) in riding?
[/INST]
Here is the SQLite query to answer to the question: What's the number of the player with 68.46 (1144 pts) in riding?:
```
SELECT MAX(_number) FROM table_12407546_1 WHERE riding = "68.46 (1144 pts)"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_98 (film VARCHAR, award VARCHAR)
Question: Name the film for award of £3,740
[/INST]
Here is the SQLite query to answer to the question: Name the film for award of £3,740:
```
SELECT film FROM table_name_98 WHERE award = "£3,740"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_89 (air_date VARCHAR, episode_number VARCHAR, event_1 VARCHAR)
Question: What is the air date the had atlasphere for event 1 before episode 11?
[/INST]
Here is the SQLite query to answer to the question: What is the air date the had atlasphere for event 1 before episode 11?:
```
SELECT air_date FROM table_name_89 WHERE episode_number < 11 AND event_1 = "atlasphere"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_5 (rider VARCHAR, grid VARCHAR)
Question: WHAT IS THE RIDER WITH A 21 GRID?
[/INST]
Here is the SQLite query to answer to the question: WHAT IS THE RIDER WITH A 21 GRID?:
```
SELECT rider FROM table_name_5 WHERE grid = "21"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_86 (launch_site VARCHAR, satellite VARCHAR, date VARCHAR, rocket VARCHAR)
Question: What is the launch site of the delta iv rocket with an unknown date and a gps iif-10 satellite?
[/INST]
Here is the SQLite query to answer to the question: What is the launch site of the delta iv rocket with an unknown date and a gps iif-10 satellite?:
```
SELECT launch_site FROM table_name_86 WHERE date = "unknown" AND rocket = "delta iv" AND satellite = "gps iif-10"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_15637071_1 (headquarters VARCHAR, icao VARCHAR)
Question: Where is the headquarters of the airline which has the ICAO code of AAU?
[/INST]
Here is the SQLite query to answer to the question: Where is the headquarters of the airline which has the ICAO code of AAU?:
```
SELECT headquarters FROM table_15637071_1 WHERE icao = "AAU"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_5 (record VARCHAR, opponent VARCHAR, loss VARCHAR)
Question: What was the record where the opponent was @ Orioles and the loss was to Leal (5-4)?
[/INST]
Here is the SQLite query to answer to the question: What was the record where the opponent was @ Orioles and the loss was to Leal (5-4)?:
```
SELECT record FROM table_name_5 WHERE opponent = "@ orioles" AND loss = "leal (5-4)"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_25711913_2 (points INTEGER, player VARCHAR)
Question: How many maximum points did Curtis scored?
[/INST]
Here is the SQLite query to answer to the question: How many maximum points did Curtis scored?:
```
SELECT MAX(points) FROM table_25711913_2 WHERE player = "Curtis"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_10966926_2 (height VARCHAR, weight VARCHAR)
Question: What is the height of the person that weighs 320 pounds?
[/INST]
Here is the SQLite query to answer to the question: What is the height of the person that weighs 320 pounds?:
```
SELECT height FROM table_10966926_2 WHERE weight = 320
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE list (grade VARCHAR, classroom VARCHAR)
Question: Find the grade studying in room 105.
[/INST]
Here is the SQLite query to answer to the question: Find the grade studying in room 105.:
```
SELECT DISTINCT grade FROM list WHERE classroom = 105
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_67 (pick__number VARCHAR, college VARCHAR)
Question: How many picks did the College of USC wind up getting?
[/INST]
Here is the SQLite query to answer to the question: How many picks did the College of USC wind up getting?:
```
SELECT COUNT(pick__number) FROM table_name_67 WHERE college = "usc"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_10236830_6 (nomination VARCHAR, film_name VARCHAR)
Question: Which nominations was the film 27 Stolen Kisses nominated for?
[/INST]
Here is the SQLite query to answer to the question: Which nominations was the film 27 Stolen Kisses nominated for?:
```
SELECT nomination FROM table_10236830_6 WHERE film_name = "27 Stolen Kisses"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_29 (year VARCHAR)
Question: What was the 2nd leg for 2004?
[/INST]
Here is the SQLite query to answer to the question: What was the 2nd leg for 2004?:
```
SELECT 2 AS nd_leg FROM table_name_29 WHERE year = 2004
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_61 (week VARCHAR, result VARCHAR)
Question: Name the week when the result was l 38-17
[/INST]
Here is the SQLite query to answer to the question: Name the week when the result was l 38-17:
```
SELECT week FROM table_name_61 WHERE result = "l 38-17"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_91 (total VARCHAR, name VARCHAR, serie_a VARCHAR, coppa_italia VARCHAR, champions_league VARCHAR)
Question: What was the total of Mauro Camoranesi when coppa italia was 0, champions league was 1 and less than 2 serie A?
[/INST]
Here is the SQLite query to answer to the question: What was the total of Mauro Camoranesi when coppa italia was 0, champions league was 1 and less than 2 serie A?:
```
SELECT total FROM table_name_91 WHERE coppa_italia = 0 AND champions_league = 1 AND serie_a < 2 AND name = "mauro camoranesi"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_12 (time VARCHAR, jockey VARCHAR)
Question: What is the time for when cornelio velasquez was the jockey?
[/INST]
Here is the SQLite query to answer to the question: What is the time for when cornelio velasquez was the jockey?:
```
SELECT time FROM table_name_12 WHERE jockey = "cornelio velasquez"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_24 (enrollment INTEGER, _number___county VARCHAR)
Question: What's the enrollment at 41 Johnson?
[/INST]
Here is the SQLite query to answer to the question: What's the enrollment at 41 Johnson?:
```
SELECT AVG(enrollment) FROM table_name_24 WHERE _number___county = "41 johnson"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_2849652_1 (_number_of_divisions VARCHAR, sport VARCHAR)
Question: How many divisions in bowling ?
[/INST]
Here is the SQLite query to answer to the question: How many divisions in bowling ? :
```
SELECT _number_of_divisions FROM table_2849652_1 WHERE sport = "Bowling"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE region (region_name VARCHAR, region_id VARCHAR); CREATE TABLE affected_region (region_id VARCHAR, storm_id VARCHAR); CREATE TABLE storm (storm_id VARCHAR, Number_Deaths VARCHAR)
Question: Find the names of the regions which were affected by the storm that killed the greatest number of people.
[/INST]
Here is the SQLite query to answer to the question: Find the names of the regions which were affected by the storm that killed the greatest number of people.:
```
SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_50 (gpu_frequency VARCHAR, part_number_s_ VARCHAR)
Question: what is the gpu frequency when the part number is cw8064701470702?
[/INST]
Here is the SQLite query to answer to the question: what is the gpu frequency when the part number is cw8064701470702?:
```
SELECT gpu_frequency FROM table_name_50 WHERE part_number_s_ = "cw8064701470702"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_15 (position VARCHAR, player VARCHAR)
Question: What position does Mikhail Kravets play?
[/INST]
Here is the SQLite query to answer to the question: What position does Mikhail Kravets play?:
```
SELECT position FROM table_name_15 WHERE player = "mikhail kravets"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_2108684_1 (episode VARCHAR, run_time VARCHAR)
Question: What episode had a run time of 23:38?
[/INST]
Here is the SQLite query to answer to the question: What episode had a run time of 23:38?:
```
SELECT episode FROM table_2108684_1 WHERE run_time = "23:38"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_80 (high_assists VARCHAR, high_rebounds VARCHAR)
Question: What is High Assists, when High Rebounds is "Dwight Howard , Rashard Lewis (10)"?
[/INST]
Here is the SQLite query to answer to the question: What is High Assists, when High Rebounds is "Dwight Howard , Rashard Lewis (10)"?:
```
SELECT high_assists FROM table_name_80 WHERE high_rebounds = "dwight howard , rashard lewis (10)"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_22962745_35 (season VARCHAR, batsmen VARCHAR)
Question: What season was herschelle gibbs andrew symonds venugopal rao batsmen?
[/INST]
Here is the SQLite query to answer to the question: What season was herschelle gibbs andrew symonds venugopal rao batsmen?:
```
SELECT season FROM table_22962745_35 WHERE batsmen = "Herschelle Gibbs Andrew Symonds Venugopal Rao"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_27713030_16 (location_attendance VARCHAR, high_assists VARCHAR)
Question: What was the location and attendance when lebron james (10) had the high assists?
[/INST]
Here is the SQLite query to answer to the question: What was the location and attendance when lebron james (10) had the high assists?:
```
SELECT location_attendance FROM table_27713030_16 WHERE high_assists = "LeBron James (10)"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_33 (category VARCHAR, year INTEGER)
Question: What category has a year after 2004?
[/INST]
Here is the SQLite query to answer to the question: What category has a year after 2004?:
```
SELECT category FROM table_name_33 WHERE year > 2004
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE GRAPES (GRAPE VARCHAR, Color VARCHAR); CREATE TABLE WINE (Winery VARCHAR, GRAPE VARCHAR)
Question: Find the top 3 wineries with the greatest number of wines made of white color grapes.
[/INST]
Here is the SQLite query to answer to the question: Find the top 3 wineries with the greatest number of wines made of white color grapes.:
```
SELECT T2.Winery FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.GRAPE = T2.GRAPE WHERE T1.Color = "White" GROUP BY T2.Winery ORDER BY COUNT(*) DESC LIMIT 3
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_19 (ground VARCHAR, away_team VARCHAR)
Question: What was the ground for away team essendon?
[/INST]
Here is the SQLite query to answer to the question: What was the ground for away team essendon?:
```
SELECT ground FROM table_name_19 WHERE away_team = "essendon"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_2623498_5 (prod_code VARCHAR, episode__number VARCHAR)
Question: What is the production code for episode #78?
[/INST]
Here is the SQLite query to answer to the question: What is the production code for episode #78?:
```
SELECT prod_code FROM table_2623498_5 WHERE episode__number = "78"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_22514845_5 (reporters VARCHAR, s_analyst VARCHAR)
Question: Name the reporters for howard cosell
[/INST]
Here is the SQLite query to answer to the question: Name the reporters for howard cosell:
```
SELECT reporters FROM table_22514845_5 WHERE s_analyst = "Howard Cosell"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_24565004_8 (nationality² VARCHAR, name VARCHAR)
Question: If the name is Patrick Grappin, what is the nationality?
[/INST]
Here is the SQLite query to answer to the question: If the name is Patrick Grappin, what is the nationality?:
```
SELECT nationality² FROM table_24565004_8 WHERE name = "Patrick Grappin"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_17 (gamecenter VARCHAR, attendance VARCHAR)
Question: Name the gamecenter that has attendance of 65,212
[/INST]
Here is the SQLite query to answer to the question: Name the gamecenter that has attendance of 65,212:
```
SELECT gamecenter FROM table_name_17 WHERE attendance = "65,212"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_21 (ties INTEGER, games_played VARCHAR, wins VARCHAR, goals_against VARCHAR)
Question: For teams with fewer than 5 wins, goals against over 37, and fewer than 8 games played, what is the average number of ties?
[/INST]
Here is the SQLite query to answer to the question: For teams with fewer than 5 wins, goals against over 37, and fewer than 8 games played, what is the average number of ties?:
```
SELECT AVG(ties) FROM table_name_21 WHERE wins < 5 AND goals_against > 37 AND games_played < 8
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_27374004_3 (outgoing_manager VARCHAR, replaced_by VARCHAR)
Question: How many outgoing managers were replaced by Bob Peeters?
[/INST]
Here is the SQLite query to answer to the question: How many outgoing managers were replaced by Bob Peeters?:
```
SELECT COUNT(outgoing_manager) FROM table_27374004_3 WHERE replaced_by = "Bob Peeters"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_82 (label VARCHAR, date VARCHAR, catalog VARCHAR)
Question: Which Label has a Date smaller than 2008, and a Catalog of fall cd 006?
[/INST]
Here is the SQLite query to answer to the question: Which Label has a Date smaller than 2008, and a Catalog of fall cd 006?:
```
SELECT label FROM table_name_82 WHERE date < 2008 AND catalog = "fall cd 006"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_58 (round INTEGER, college VARCHAR)
Question: What is the lowest round for Southern College?
[/INST]
Here is the SQLite query to answer to the question: What is the lowest round for Southern College?:
```
SELECT MIN(round) FROM table_name_58 WHERE college = "southern"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_88 (result VARCHAR, race VARCHAR)
Question: What is the result of the ajc craven plate (wfa) race?
[/INST]
Here is the SQLite query to answer to the question: What is the result of the ajc craven plate (wfa) race?:
```
SELECT result FROM table_name_88 WHERE race = "ajc craven plate (wfa)"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_91 (date VARCHAR, margin_of_victory VARCHAR)
Question: What date had a margin victory of 2 strokes?
[/INST]
Here is the SQLite query to answer to the question: What date had a margin victory of 2 strokes?:
```
SELECT date FROM table_name_91 WHERE margin_of_victory = "2 strokes"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_16 (visitor VARCHAR, date VARCHAR)
Question: on january 12 who was the visitor?
[/INST]
Here is the SQLite query to answer to the question: on january 12 who was the visitor?:
```
SELECT visitor FROM table_name_16 WHERE date = "january 12"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_22 (finish VARCHAR, franchise VARCHAR, year VARCHAR, league VARCHAR, percentage VARCHAR)
Question: What was the Finish when NL was the League, the Percentage was under 0.726, the Year was larger than 1897, and the Franchies was the Pittsburgh Pirates?
[/INST]
Here is the SQLite query to answer to the question: What was the Finish when NL was the League, the Percentage was under 0.726, the Year was larger than 1897, and the Franchies was the Pittsburgh Pirates?:
```
SELECT finish FROM table_name_22 WHERE league = "nl" AND percentage < 0.726 AND year > 1897 AND franchise = "pittsburgh pirates"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE course (crs_description VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_lname VARCHAR, stu_num VARCHAR)
Question: Find names of all students who took some course and the course description.
[/INST]
Here is the SQLite query to answer to the question: Find names of all students who took some course and the course description.:
```
SELECT T1.stu_fname, T1.stu_lname, T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_43 (rank INTEGER, studio_s_ VARCHAR, year VARCHAR)
Question: Tell me the average rank for dharma productions before 2013
[/INST]
Here is the SQLite query to answer to the question: Tell me the average rank for dharma productions before 2013:
```
SELECT AVG(rank) FROM table_name_43 WHERE studio_s_ = "dharma productions" AND year < 2013
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_78 (commissioned VARCHAR, laid_down VARCHAR)
Question: What is Commissioned, when Laid Down is "6 September 2003"?
[/INST]
Here is the SQLite query to answer to the question: What is Commissioned, when Laid Down is "6 September 2003"?:
```
SELECT commissioned FROM table_name_78 WHERE laid_down = "6 september 2003"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_89 (total VARCHAR, league INTEGER)
Question: what is the total when the league is less than 1?
[/INST]
Here is the SQLite query to answer to the question: what is the total when the league is less than 1?:
```
SELECT total FROM table_name_89 WHERE league < 1
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_25 (album_title VARCHAR, original_label VARCHAR)
Question: What is the title of the album that has Popup has the original label?
[/INST]
Here is the SQLite query to answer to the question: What is the title of the album that has Popup has the original label?:
```
SELECT album_title FROM table_name_25 WHERE original_label = "popup"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_89 (sellouts INTEGER, year VARCHAR, total_for_year VARCHAR)
Question: What is the maximum sellouts for the 2008 year, with less than 161,369 total for year?
[/INST]
Here is the SQLite query to answer to the question: What is the maximum sellouts for the 2008 year, with less than 161,369 total for year?:
```
SELECT MAX(sellouts) FROM table_name_89 WHERE year = 2008 AND total_for_year < 161 OFFSET 369
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_64 (venue VARCHAR, date VARCHAR)
Question: What was the venue for the dates 1,2,3,4,6,7 jan 1908?
[/INST]
Here is the SQLite query to answer to the question: What was the venue for the dates 1,2,3,4,6,7 jan 1908?:
```
SELECT venue FROM table_name_64 WHERE date = "1,2,3,4,6,7 jan 1908"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_20522228_2 (share INTEGER, rank__overall_ VARCHAR)
Question: What was the share for rank 54?
[/INST]
Here is the SQLite query to answer to the question: What was the share for rank 54?:
```
SELECT MAX(share) FROM table_20522228_2 WHERE rank__overall_ = "54"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_261946_3 (enrollment VARCHAR, location__all_in_ohio_ VARCHAR)
Question: What is the enrollment for Ashland University?
[/INST]
Here is the SQLite query to answer to the question: What is the enrollment for Ashland University?:
```
SELECT enrollment FROM table_261946_3 WHERE location__all_in_ohio_ = "Ashland"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_65 (romaji_title VARCHAR, tv_station VARCHAR, average_ratings VARCHAR)
Question: Which Romaji Title has a TV Station of fuji tv, and Average Ratings of 12.41%?
[/INST]
Here is the SQLite query to answer to the question: Which Romaji Title has a TV Station of fuji tv, and Average Ratings of 12.41%?:
```
SELECT romaji_title FROM table_name_65 WHERE tv_station = "fuji tv" AND average_ratings = "12.41%"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_7 (away_team VARCHAR)
Question: When the away team was geelong, what was the away team score?
[/INST]
Here is the SQLite query to answer to the question: When the away team was geelong, what was the away team score?:
```
SELECT away_team AS score FROM table_name_7 WHERE away_team = "geelong"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_83 (name VARCHAR, total_goals VARCHAR, fa_cup_goals VARCHAR, league_cup_goals VARCHAR)
Question: Who had fa cup goals of 0, league cup goals less than 2, and total goals of 2?
[/INST]
Here is the SQLite query to answer to the question: Who had fa cup goals of 0, league cup goals less than 2, and total goals of 2?:
```
SELECT name FROM table_name_83 WHERE fa_cup_goals = 0 AND league_cup_goals < 2 AND total_goals = 2
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_95 (founded VARCHAR, suburb VARCHAR)
Question: What year was the Beaudesert suburb club founded
[/INST]
Here is the SQLite query to answer to the question: What year was the Beaudesert suburb club founded:
```
SELECT founded FROM table_name_95 WHERE suburb = "beaudesert"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_37 (origin VARCHAR, versions VARCHAR)
Question: Where is the origin of the tth version?
[/INST]
Here is the SQLite query to answer to the question: Where is the origin of the tth version?:
```
SELECT origin FROM table_name_37 WHERE versions = "tth"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_32 (report VARCHAR, location VARCHAR)
Question: What was the Report for the Monaco race?
[/INST]
Here is the SQLite query to answer to the question: What was the Report for the Monaco race?:
```
SELECT report FROM table_name_32 WHERE location = "monaco"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE basketball_match (acc_percent VARCHAR)
Question: What is the highest acc percent score in the competition?
[/INST]
Here is the SQLite query to answer to the question: What is the highest acc percent score in the competition?:
```
SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE Highschooler (grade VARCHAR)
Question: Which grade has the most high schoolers?
[/INST]
Here is the SQLite query to answer to the question: Which grade has the most high schoolers?:
```
SELECT grade FROM Highschooler GROUP BY grade ORDER BY COUNT(*) DESC LIMIT 1
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_37 (weight INTEGER, result VARCHAR, distance VARCHAR)
Question: What is the largest weight wth a Result of –, and a Distance of 7f?
[/INST]
Here is the SQLite query to answer to the question: What is the largest weight wth a Result of –, and a Distance of 7f?:
```
SELECT MAX(weight) FROM table_name_37 WHERE result = "–" AND distance = "7f"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_62 (game INTEGER, date VARCHAR, batting_2nd VARCHAR)
Question: what is the game for 23 april when batting 2nd is england 5/113 (19)?
[/INST]
Here is the SQLite query to answer to the question: what is the game for 23 april when batting 2nd is england 5/113 (19)?:
```
SELECT MIN(game) FROM table_name_62 WHERE date = "23 april" AND batting_2nd = "england 5/113 (19)"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_98 (home_team VARCHAR, away_team VARCHAR)
Question: Who was the home team when Melbourne was the away team?
[/INST]
Here is the SQLite query to answer to the question: Who was the home team when Melbourne was the away team?:
```
SELECT home_team FROM table_name_98 WHERE away_team = "melbourne"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_80 (attendance VARCHAR, opponent VARCHAR)
Question: How many people attended when opponent was twins?
[/INST]
Here is the SQLite query to answer to the question: How many people attended when opponent was twins?:
```
SELECT COUNT(attendance) FROM table_name_80 WHERE opponent = "twins"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_90 (tournament VARCHAR, score VARCHAR)
Question: What tournament had a Score of 6–3, 2–6, [10–8]?
[/INST]
Here is the SQLite query to answer to the question: What tournament had a Score of 6–3, 2–6, [10–8]?:
```
SELECT tournament FROM table_name_90 WHERE score = "6–3, 2–6, [10–8]"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_26202788_7 (opponent_in_the_final VARCHAR, championship VARCHAR)
Question: In the championship Indian Wells, United States (2), who are the opponents in the final?
[/INST]
Here is the SQLite query to answer to the question: In the championship Indian Wells, United States (2), who are the opponents in the final?:
```
SELECT opponent_in_the_final FROM table_26202788_7 WHERE championship = "Indian Wells, United States (2)"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_78 (area VARCHAR, authority VARCHAR, roll VARCHAR)
Question: Which area has state authority and a roll fewer than 18?
[/INST]
Here is the SQLite query to answer to the question: Which area has state authority and a roll fewer than 18?:
```
SELECT area FROM table_name_78 WHERE authority = "state" AND roll < 18
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_3 (home_team VARCHAR, away_team VARCHAR)
Question: What was the home team when the away team was Frickley Athletic?
[/INST]
Here is the SQLite query to answer to the question: What was the home team when the away team was Frickley Athletic?:
```
SELECT home_team FROM table_name_3 WHERE away_team = "frickley athletic"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_39 (label VARCHAR, country_of_release VARCHAR)
Question: When the country of release is EU, what is the label name?
[/INST]
Here is the SQLite query to answer to the question: When the country of release is EU, what is the label name?:
```
SELECT label FROM table_name_39 WHERE country_of_release = "eu"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_10023387_1 (doubles_w_l VARCHAR, player VARCHAR)
Question: what's the doubles w-l for player seol jae-min (none)
[/INST]
Here is the SQLite query to answer to the question: what's the doubles w-l for player seol jae-min (none):
```
SELECT doubles_w_l FROM table_10023387_1 WHERE player = "Seol Jae-Min (none)"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_74 (laps INTEGER, rider VARCHAR, grid VARCHAR)
Question: What is the sum of laps for Karl Muggeridge on a grid less than 16?
[/INST]
Here is the SQLite query to answer to the question: What is the sum of laps for Karl Muggeridge on a grid less than 16?:
```
SELECT SUM(laps) FROM table_name_74 WHERE rider = "karl muggeridge" AND grid < 16
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE school (school_name VARCHAR, school_id VARCHAR); CREATE TABLE endowment (school_id VARCHAR, amount INTEGER)
Question: List all the names of schools with an endowment amount smaller than or equal to 10.
[/INST]
Here is the SQLite query to answer to the question: List all the names of schools with an endowment amount smaller than or equal to 10.:
```
SELECT T2.school_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T1.school_id HAVING SUM(T1.amount) <= 10
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE student (name VARCHAR, id VARCHAR); CREATE TABLE takes (course_id VARCHAR, id VARCHAR); CREATE TABLE course (course_id VARCHAR, dept_name VARCHAR)
Question: Find the name of students who took some course offered by Statistics department.
[/INST]
Here is the SQLite query to answer to the question: Find the name of students who took some course offered by Statistics department.:
```
SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id = T2.course_id JOIN student AS T3 ON T2.id = T3.id WHERE T1.dept_name = 'Statistics'
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_26250199_1 (song_choice VARCHAR, theme VARCHAR)
Question: The theme Auditioner's Choice has what song choice?
[/INST]
Here is the SQLite query to answer to the question: The theme Auditioner's Choice has what song choice?:
```
SELECT song_choice FROM table_26250199_1 WHERE theme = "Auditioner's Choice"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_1930857_1 (language VARCHAR, grades VARCHAR)
Question: What's the language in the school teaching grades 4-12?
[/INST]
Here is the SQLite query to answer to the question: What's the language in the school teaching grades 4-12?:
```
SELECT language FROM table_1930857_1 WHERE grades = "4-12"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_29 (partnering VARCHAR, tournament VARCHAR)
Question: Who was the partner for the tournament in Lyon, France?
[/INST]
Here is the SQLite query to answer to the question: Who was the partner for the tournament in Lyon, France?:
```
SELECT partnering FROM table_name_29 WHERE tournament = "lyon, france"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_1676073_12 (played VARCHAR, points VARCHAR)
Question: How many games played for the team with 48 points?
[/INST]
Here is the SQLite query to answer to the question: How many games played for the team with 48 points?:
```
SELECT played FROM table_1676073_12 WHERE points = "48"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_2140071_5 (season VARCHAR, premier_date VARCHAR)
Question: How many seasons have a premier date of January 6, 2005?
[/INST]
Here is the SQLite query to answer to the question: How many seasons have a premier date of January 6, 2005? :
```
SELECT COUNT(season) FROM table_2140071_5 WHERE premier_date = "January 6, 2005"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_90 (skipper VARCHAR, points VARCHAR)
Question: Which skipper has 78 points?
[/INST]
Here is the SQLite query to answer to the question: Which skipper has 78 points?:
```
SELECT skipper FROM table_name_90 WHERE points = "78"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_47 (opponent VARCHAR, res VARCHAR, time VARCHAR)
Question: Who was the opponent in the bout that led to a win in a time of 1:21?
[/INST]
Here is the SQLite query to answer to the question: Who was the opponent in the bout that led to a win in a time of 1:21?:
```
SELECT opponent FROM table_name_47 WHERE res = "win" AND time = "1:21"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_98 (ave__no INTEGER, name VARCHAR, height__m_ VARCHAR)
Question: Which sum of AVE-No has a Name of albula alps, and a Height (m) larger than 3418?
[/INST]
Here is the SQLite query to answer to the question: Which sum of AVE-No has a Name of albula alps, and a Height (m) larger than 3418?:
```
SELECT SUM(ave__no) FROM table_name_98 WHERE name = "albula alps" AND height__m_ > 3418
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_22 (Id VARCHAR)
Question: What is the 1994 finish in the event that had a 1998 finish of 2R?
[/INST]
Here is the SQLite query to answer to the question: What is the 1994 finish in the event that had a 1998 finish of 2R?:
```
SELECT 1994 FROM table_name_22 WHERE 1998 = "2r"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_22871239_5 (score VARCHAR, team VARCHAR)
Question: What was the score when the team was @ New Jersey?
[/INST]
Here is the SQLite query to answer to the question: What was the score when the team was @ New Jersey? :
```
SELECT score FROM table_22871239_5 WHERE team = "@ New Jersey"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_2818164_5 (no_in_season VARCHAR, original_air_date VARCHAR)
Question: What episoe number in the season originally aired on February 11, 1988?
[/INST]
Here is the SQLite query to answer to the question: What episoe number in the season originally aired on February 11, 1988?:
```
SELECT no_in_season FROM table_2818164_5 WHERE original_air_date = "February 11, 1988"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_74 (iheartradio VARCHAR, show VARCHAR)
Question: What is the iHeartRadio of the Bronson and Christine Show?
[/INST]
Here is the SQLite query to answer to the question: What is the iHeartRadio of the Bronson and Christine Show?:
```
SELECT iheartradio FROM table_name_74 WHERE show = "bronson and christine"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_17 (episode_number VARCHAR, podcast_date VARCHAR)
Question: What is the episode number of the episode that aired on August 8, 2005?
[/INST]
Here is the SQLite query to answer to the question: What is the episode number of the episode that aired on August 8, 2005?:
```
SELECT episode_number FROM table_name_17 WHERE podcast_date = "august 8, 2005"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_71 (rank INTEGER, bronze VARCHAR, silver VARCHAR, total VARCHAR)
Question: What is the lowest rank for a nation with 29 total medals, over 5 silvers, and under 16 bronze?
[/INST]
Here is the SQLite query to answer to the question: What is the lowest rank for a nation with 29 total medals, over 5 silvers, and under 16 bronze?:
```
SELECT MIN(rank) FROM table_name_71 WHERE silver > 5 AND total = 29 AND bronze < 16
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_44 (score VARCHAR, competition VARCHAR, date VARCHAR)
Question: What is the Score of West Asian Games 2005 on 10 dec 2005?
[/INST]
Here is the SQLite query to answer to the question: What is the Score of West Asian Games 2005 on 10 dec 2005?:
```
SELECT score FROM table_name_44 WHERE competition = "west asian games 2005" AND date = "10 dec 2005"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_27 (born VARCHAR, age_at_first_step VARCHAR)
Question: The Apollo astronaut who was 38y 9m 7d when first stepping on the moon is who?
[/INST]
Here is the SQLite query to answer to the question: The Apollo astronaut who was 38y 9m 7d when first stepping on the moon is who?:
```
SELECT born FROM table_name_27 WHERE age_at_first_step = "38y 9m 7d"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_22 (grid INTEGER, rider VARCHAR)
Question: What is the Grid for Rider Ruben Xaus?
[/INST]
Here is the SQLite query to answer to the question: What is the Grid for Rider Ruben Xaus?:
```
SELECT MIN(grid) FROM table_name_22 WHERE rider = "ruben xaus"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE student (dept_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR)
Question: What is the department name of the students with lowest gpa belongs to?
[/INST]
Here is the SQLite query to answer to the question: What is the department name of the students with lowest gpa belongs to?:
```
SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa LIMIT 1
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_46 (surface VARCHAR, tournament VARCHAR)
Question: What is the surface for the Volos tournament?
[/INST]
Here is the SQLite query to answer to the question: What is the surface for the Volos tournament?:
```
SELECT surface FROM table_name_46 WHERE tournament = "volos"
``` |