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_26 (played INTEGER, drawn VARCHAR, position VARCHAR, points VARCHAR)
Question: Which Played has a Position larger than 5, a Points larger than 0, and a Drawn smaller than 0?
[/INST]
Here is the SQLite query to answer to the question: Which Played has a Position larger than 5, a Points larger than 0, and a Drawn smaller than 0?:
```
SELECT MAX(played) FROM table_name_26 WHERE position > 5 AND points > 0 AND drawn < 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_63 (player VARCHAR, team VARCHAR)
Question: Who is the player on a team from the 1970s?
[/INST]
Here is the SQLite query to answer to the question: Who is the player on a team from the 1970s?:
```
SELECT player FROM table_name_63 WHERE team = "1970s"
``` |
[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 (team VARCHAR, drivers VARCHAR)
Question: Christian Fittipaldi drove in what team?
[/INST]
Here is the SQLite query to answer to the question: Christian Fittipaldi drove in what team?:
```
SELECT team FROM table_name_74 WHERE drivers = "christian fittipaldi"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_28498999_3 (country VARCHAR, score VARCHAR)
Question: What is the country for the score 72-63-71-68=274?
[/INST]
Here is the SQLite query to answer to the question: What is the country for the score 72-63-71-68=274?:
```
SELECT country FROM table_28498999_3 WHERE score = 72 - 63 - 71 - 68 = 274
``` |
[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 (area__km²_ VARCHAR, pop__km² VARCHAR, _english_ VARCHAR)
Question: What area has less than 0.97 mil in population and is on the east?
[/INST]
Here is the SQLite query to answer to the question: What area has less than 0.97 mil in population and is on the east?:
```
SELECT area__km²_ FROM table_name_95 WHERE pop__km² < 0.97 AND _english_ = "east"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_77 (became_duchess VARCHAR, name VARCHAR)
Question: When did eleonor magdalene of the palatinate-neuburg become duchess?
[/INST]
Here is the SQLite query to answer to the question: When did eleonor magdalene of the palatinate-neuburg become duchess?:
```
SELECT became_duchess FROM table_name_77 WHERE name = "eleonor magdalene of the palatinate-neuburg"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_59 (january VARCHAR, march VARCHAR)
Question: Who is the January playmate with a March playmate Alexandria Karlsen?
[/INST]
Here is the SQLite query to answer to the question: Who is the January playmate with a March playmate Alexandria Karlsen?:
```
SELECT january FROM table_name_59 WHERE march = "alexandria karlsen"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_14603212_5 (school_year VARCHAR, class_aAAA VARCHAR, Gregory VARCHAR, Portland VARCHAR)
Question: What are all the school years where class AAAA is in Gregory-Portland?
[/INST]
Here is the SQLite query to answer to the question: What are all the school years where class AAAA is in Gregory-Portland? :
```
SELECT school_year FROM table_14603212_5 WHERE class_aAAA = Gregory - Portland
``` |
[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 (gold VARCHAR, year VARCHAR)
Question: Who won the gold medal in 1998?
[/INST]
Here is the SQLite query to answer to the question: Who won the gold medal in 1998?:
```
SELECT gold FROM table_name_15 WHERE year = 1998
``` |
[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 (surface VARCHAR, opponent VARCHAR, score VARCHAR)
Question: What is the Surface of the court against Ivo Klec with a Score of 6–3, 6–3?
[/INST]
Here is the SQLite query to answer to the question: What is the Surface of the court against Ivo Klec with a Score of 6–3, 6–3?:
```
SELECT surface FROM table_name_61 WHERE opponent = "ivo klec" AND score = "6–3, 6–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_59 (engine VARCHAR, entrant VARCHAR)
Question: Name the engine with entrant of larrousse f1
[/INST]
Here is the SQLite query to answer to the question: Name the engine with entrant of larrousse f1:
```
SELECT engine FROM table_name_59 WHERE entrant = "larrousse f1"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_22384475_1 (match_date VARCHAR, winner VARCHAR)
Question: What date did the West Indies win the match?
[/INST]
Here is the SQLite query to answer to the question: What date did the West Indies win the match?:
```
SELECT match_date FROM table_22384475_1 WHERE winner = "West Indies"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_20466963_4 (guest_2 VARCHAR, guest_4 VARCHAR, guest_3 VARCHAR)
Question: Who is the guest 2 in the episode where guest 4 is Iyare Igiehon and guest 3 is John Oliver?
[/INST]
Here is the SQLite query to answer to the question: Who is the guest 2 in the episode where guest 4 is Iyare Igiehon and guest 3 is John Oliver?:
```
SELECT guest_2 FROM table_20466963_4 WHERE guest_4 = "Iyare Igiehon" AND guest_3 = "John Oliver"
``` |
[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 (away_team VARCHAR, home_team VARCHAR)
Question: What team played Hawthorn?
[/INST]
Here is the SQLite query to answer to the question: What team played Hawthorn?:
```
SELECT away_team FROM table_name_82 WHERE home_team = "hawthorn"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_20754016_2 (country VARCHAR, hometown VARCHAR)
Question: What country is the contestant from Chihuahua from?
[/INST]
Here is the SQLite query to answer to the question: What country is the contestant from Chihuahua from?:
```
SELECT country FROM table_20754016_2 WHERE hometown = "Chihuahua"
``` |
[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 (venue VARCHAR, date VARCHAR)
Question: What was the venue for the game on 10-09-2012?
[/INST]
Here is the SQLite query to answer to the question: What was the venue for the game on 10-09-2012?:
```
SELECT venue FROM table_name_71 WHERE date = "10-09-2012"
``` |
[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 (to_par VARCHAR, year_s__won VARCHAR)
Question: What is To Par, when Year(s) Won is "1968 , 1971"?
[/INST]
Here is the SQLite query to answer to the question: What is To Par, when Year(s) Won is "1968 , 1971"?:
```
SELECT to_par FROM table_name_99 WHERE year_s__won = "1968 , 1971"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_28 (first_elected VARCHAR, party VARCHAR, member VARCHAR)
Question: Which first election for the labor party is James Sharpe a part of?
[/INST]
Here is the SQLite query to answer to the question: Which first election for the labor party is James Sharpe a part of?:
```
SELECT first_elected FROM table_name_28 WHERE party = "labor" AND member = "james sharpe"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_18095719_2 (winning_team VARCHAR, circuit VARCHAR)
Question: Who was the winning team on the circuit Zolder?
[/INST]
Here is the SQLite query to answer to the question: Who was the winning team on the circuit Zolder?:
```
SELECT winning_team FROM table_18095719_2 WHERE circuit = "Zolder"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_8 (family_friendly VARCHAR, decade VARCHAR, genre VARCHAR)
Question: What is the family friendly status of the punk genre song from the 1970s?
[/INST]
Here is the SQLite query to answer to the question: What is the family friendly status of the punk genre song from the 1970s?:
```
SELECT family_friendly FROM table_name_8 WHERE decade = "1970s" AND genre = "punk"
``` |
[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 (highest_rank VARCHAR, name VARCHAR)
Question: Which Rank is Highest for Yoshiazuma?
[/INST]
Here is the SQLite query to answer to the question: Which Rank is Highest for Yoshiazuma?:
```
SELECT highest_rank FROM table_name_44 WHERE name = "yoshiazuma"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_1 (enterprise VARCHAR, datacenter VARCHAR, features VARCHAR)
Question: What is the Enterprise for teh memory modules: hot replacement Feature that has a Datacenter of Yes?
[/INST]
Here is the SQLite query to answer to the question: What is the Enterprise for teh memory modules: hot replacement Feature that has a Datacenter of Yes?:
```
SELECT enterprise FROM table_name_1 WHERE datacenter = "yes" AND features = "memory modules: hot replacement"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_81 (score VARCHAR, game VARCHAR)
Question: When the game is listed as 2, what is the score?
[/INST]
Here is the SQLite query to answer to the question: When the game is listed as 2, what is the score?:
```
SELECT score FROM table_name_81 WHERE game = 2
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE review (i_id VARCHAR); CREATE TABLE item (i_id VARCHAR)
Question: Find the number of items that did not receive any review.
[/INST]
Here is the SQLite query to answer to the question: Find the number of items that did not receive any review.:
```
SELECT COUNT(*) FROM item WHERE NOT i_id IN (SELECT i_id FROM review)
``` |
[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 (attendance VARCHAR, record VARCHAR)
Question: How many people attended the game whose score was 1-1?
[/INST]
Here is the SQLite query to answer to the question: How many people attended the game whose score was 1-1?:
```
SELECT attendance FROM table_name_62 WHERE record = "1-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_38 (branding VARCHAR, power VARCHAR, location VARCHAR)
Question: What is the Branding of the Iloilo City Frequency with a Power of 10 Kw?
[/INST]
Here is the SQLite query to answer to the question: What is the Branding of the Iloilo City Frequency with a Power of 10 Kw?:
```
SELECT branding FROM table_name_38 WHERE power = "10 kw" AND location = "iloilo city"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_9 (location VARCHAR, round VARCHAR, opponent VARCHAR)
Question: Which location had a round of 3, and an Opponent of matt horwich?
[/INST]
Here is the SQLite query to answer to the question: Which location had a round of 3, and an Opponent of matt horwich?:
```
SELECT location FROM table_name_9 WHERE round < 3 AND opponent = "matt horwich"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_17288825_10 (high_assists VARCHAR, date VARCHAR)
Question: What was the high assists on April 7?
[/INST]
Here is the SQLite query to answer to the question: What was the high assists on April 7?:
```
SELECT high_assists FROM table_17288825_10 WHERE date = "April 7"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_34 (total INTEGER, gold VARCHAR, silver VARCHAR)
Question: What nation had more than 97 Gold Medals and fewer than 332 Silver Medals?
[/INST]
Here is the SQLite query to answer to the question: What nation had more than 97 Gold Medals and fewer than 332 Silver Medals?:
```
SELECT SUM(total) FROM table_name_34 WHERE gold > 97 AND silver < 332
``` |
[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 (away VARCHAR, plyff VARCHAR, opponent VARCHAR)
Question: Which away team has a playoff record of (0-0) and played against Sioux City Bandits?
[/INST]
Here is the SQLite query to answer to the question: Which away team has a playoff record of (0-0) and played against Sioux City Bandits?:
```
SELECT away FROM table_name_46 WHERE plyff = "(0-0)" AND opponent = "sioux city bandits"
``` |
[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 (title VARCHAR, name VARCHAR)
Question: What is the title of ahaziah?
[/INST]
Here is the SQLite query to answer to the question: What is the title of ahaziah?:
```
SELECT title FROM table_name_16 WHERE name = "ahaziah"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_97 (goals_against VARCHAR, played INTEGER)
Question: How many Goals against have Played more than 34?
[/INST]
Here is the SQLite query to answer to the question: How many Goals against have Played more than 34?:
```
SELECT COUNT(goals_against) FROM table_name_97 WHERE played > 34
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_26998135_2 (replaced_by VARCHAR, date_of_vacancy VARCHAR)
Question: Who is the replaced by when the date of vacancy is 27 december 2010?
[/INST]
Here is the SQLite query to answer to the question: Who is the replaced by when the date of vacancy is 27 december 2010?:
```
SELECT replaced_by FROM table_26998135_2 WHERE date_of_vacancy = "27 December 2010"
``` |
[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 (launch_date VARCHAR, designation VARCHAR)
Question: When did the atv-002 launch?
[/INST]
Here is the SQLite query to answer to the question: When did the atv-002 launch?:
```
SELECT launch_date FROM table_name_22 WHERE designation = "atv-002"
``` |
[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 (date VARCHAR, circuit VARCHAR)
Question: Name the date for circuit of interlagos
[/INST]
Here is the SQLite query to answer to the question: Name the date for circuit of interlagos:
```
SELECT date FROM table_name_50 WHERE circuit = "interlagos"
``` |
[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 (round VARCHAR, opponent VARCHAR)
Question: In what round did opponent Joe Lauzon play?
[/INST]
Here is the SQLite query to answer to the question: In what round did opponent Joe Lauzon play?:
```
SELECT round FROM table_name_39 WHERE opponent = "joe lauzon"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_26137666_3 (pole_position VARCHAR, circuit VARCHAR, winning_driver VARCHAR)
Question: What is every pole position for the Castle Combe circuit and Robbie Kerr is the winning driver?
[/INST]
Here is the SQLite query to answer to the question: What is every pole position for the Castle Combe circuit and Robbie Kerr is the winning driver?:
```
SELECT pole_position FROM table_26137666_3 WHERE circuit = "Castle Combe" AND winning_driver = "Robbie Kerr"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_48 (place VARCHAR, player VARCHAR)
Question: Which Place has a Player of justin leonard?
[/INST]
Here is the SQLite query to answer to the question: Which Place has a Player of justin leonard?:
```
SELECT place FROM table_name_48 WHERE player = "justin leonard"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_222198_1 (orchestra VARCHAR, year_of_recording VARCHAR)
Question: Where is the orchestra when the year of recording is 1934?
[/INST]
Here is the SQLite query to answer to the question: Where is the orchestra when the year of recording is 1934?:
```
SELECT orchestra FROM table_222198_1 WHERE year_of_recording = 1934
``` |
[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 (time_retired VARCHAR, constructor VARCHAR, grid VARCHAR)
Question: What is the Time/Retired for brabham - climax, on Grid of 10?
[/INST]
Here is the SQLite query to answer to the question: What is the Time/Retired for brabham - climax, on Grid of 10?:
```
SELECT time_retired FROM table_name_89 WHERE constructor = "brabham - climax" AND grid = 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_84 (opponent VARCHAR, result VARCHAR)
Question: Tell me the opponent that had a result of l 27-20
[/INST]
Here is the SQLite query to answer to the question: Tell me the opponent that had a result of l 27-20:
```
SELECT opponent FROM table_name_84 WHERE result = "l 27-20"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_17275810_7 (team VARCHAR, replaced_by VARCHAR)
Question: Name the team for mario somma
[/INST]
Here is the SQLite query to answer to the question: Name the team for mario somma:
```
SELECT team FROM table_17275810_7 WHERE replaced_by = "Mario Somma"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_97 (score VARCHAR, date VARCHAR)
Question: What is the score on March 18?
[/INST]
Here is the SQLite query to answer to the question: What is the score on March 18?:
```
SELECT score FROM table_name_97 WHERE date = "march 18"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_24193494_3 (manufacturer VARCHAR, order_year VARCHAR)
Question: Name the manufacturer for 2011
[/INST]
Here is the SQLite query to answer to the question: Name the manufacturer for 2011:
```
SELECT manufacturer FROM table_24193494_3 WHERE order_year = 2011
``` |
[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 (year VARCHAR, team VARCHAR, tournament VARCHAR, finish VARCHAR)
Question: In what Year was 1st Division El Salvador with a Finish of Champion and a Team of Fas?
[/INST]
Here is the SQLite query to answer to the question: In what Year was 1st Division El Salvador with a Finish of Champion and a Team of Fas?:
```
SELECT year FROM table_name_83 WHERE tournament = "1st division el salvador" AND finish = "champion" AND team = "fas"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_15333005_1 (Ends VARCHAR, pa VARCHAR)
Question: Name the ends lost for 67 pa
[/INST]
Here is the SQLite query to answer to the question: Name the ends lost for 67 pa:
```
SELECT Ends AS lost FROM table_15333005_1 WHERE pa = 67
``` |
[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 (grid INTEGER, time_retired VARCHAR, laps VARCHAR)
Question: What is the low grid total for a retired due to steering in under 15 laps?
[/INST]
Here is the SQLite query to answer to the question: What is the low grid total for a retired due to steering in under 15 laps?:
```
SELECT MIN(grid) FROM table_name_21 WHERE time_retired = "steering" AND laps < 15
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_1341472_15 (candidates VARCHAR, first_elected VARCHAR)
Question: what's the total number of candidates for first elected in 1948 , 1964
[/INST]
Here is the SQLite query to answer to the question: what's the total number of candidates for first elected in 1948 , 1964:
```
SELECT COUNT(candidates) FROM table_1341472_15 WHERE first_elected = "1948 , 1964"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_20061872_1 (original_title VARCHAR, film_title_used_in_nomination VARCHAR)
Question: What's the original title of the film Zozo?
[/INST]
Here is the SQLite query to answer to the question: What's the original title of the film Zozo?:
```
SELECT original_title FROM table_20061872_1 WHERE film_title_used_in_nomination = "Zozo"
``` |
[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 (bronze INTEGER, rank VARCHAR, gold VARCHAR)
Question: What is the sum of bronzes associated with 0 golds and a rank of 10?
[/INST]
Here is the SQLite query to answer to the question: What is the sum of bronzes associated with 0 golds and a rank of 10?:
```
SELECT SUM(bronze) FROM table_name_67 WHERE rank = "10" AND gold < 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_94 (country VARCHAR, transfer_fee VARCHAR, name VARCHAR)
Question: What is the Country, when the Transfer fee is "loan", and when the Name is Lynch?
[/INST]
Here is the SQLite query to answer to the question: What is the Country, when the Transfer fee is "loan", and when the Name is Lynch?:
```
SELECT country FROM table_name_94 WHERE transfer_fee = "loan" AND name = "lynch"
``` |
[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 (year INTEGER, venue VARCHAR, position VARCHAR, event VARCHAR)
Question: What is the average Year, when Position is 9th, when Event is 100 m, and when Venue is Munich, Germany?
[/INST]
Here is the SQLite query to answer to the question: What is the average Year, when Position is 9th, when Event is 100 m, and when Venue is Munich, Germany?:
```
SELECT AVG(year) FROM table_name_66 WHERE position = "9th" AND event = "100 m" AND venue = "munich, germany"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_27274566_2 (date VARCHAR, home_team VARCHAR, result VARCHAR)
Question: How many dates are shown for the home team of orlando pirates and result of 1–3?
[/INST]
Here is the SQLite query to answer to the question: How many dates are shown for the home team of orlando pirates and result of 1–3?:
```
SELECT COUNT(date) FROM table_27274566_2 WHERE home_team = "Orlando Pirates" AND result = "1–3"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)
Question: Find the names of customers who have bought by at least three distinct products.
[/INST]
Here is the SQLite query to answer to the question: Find the names of customers who have bought by at least three distinct products.:
```
SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT(DISTINCT T3.product_id) >= 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_52 (goals INTEGER, assists VARCHAR, apps VARCHAR)
Question: What is the total goals with 12 assists, and less than 291 apps?
[/INST]
Here is the SQLite query to answer to the question: What is the total goals with 12 assists, and less than 291 apps?:
```
SELECT SUM(goals) FROM table_name_52 WHERE assists = 12 AND apps < 291
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_11662133_3 (date_entered_service VARCHAR, ships_name VARCHAR)
Question: what's the date entered service with ships name koningin wilhelmina
[/INST]
Here is the SQLite query to answer to the question: what's the date entered service with ships name koningin wilhelmina:
```
SELECT date_entered_service FROM table_11662133_3 WHERE ships_name = "Koningin Wilhelmina"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_52 (nationality VARCHAR, time VARCHAR)
Question: Which nationality has a time of 50.92?
[/INST]
Here is the SQLite query to answer to the question: Which nationality has a time of 50.92?:
```
SELECT nationality FROM table_name_52 WHERE time = 50.92
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_45 (number_of_seats INTEGER, leader VARCHAR)
Question: What is Jillian Evans highest number of seats?
[/INST]
Here is the SQLite query to answer to the question: What is Jillian Evans highest number of seats?:
```
SELECT MAX(number_of_seats) FROM table_name_45 WHERE leader = "jillian evans"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE member (card_number VARCHAR, name VARCHAR, hometown VARCHAR, LEVEL VARCHAR)
Question: Show card number, name, and hometown for all members in a descending order of level.
[/INST]
Here is the SQLite query to answer to the question: Show card number, name, and hometown for all members in a descending order of level.:
```
SELECT card_number, name, hometown FROM member ORDER BY LEVEL DESC
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_12146068_2 (gt1_winning_team VARCHAR, rnd VARCHAR)
Question: What is the number of gt1 winning team for rnd 5?
[/INST]
Here is the SQLite query to answer to the question: What is the number of gt1 winning team for rnd 5?:
```
SELECT COUNT(gt1_winning_team) FROM table_12146068_2 WHERE rnd = 5
``` |
[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 (week_1 VARCHAR, week_2 VARCHAR)
Question: Who was the girl on week 1 that preceded week 2's Kamila Sulewska?
[/INST]
Here is the SQLite query to answer to the question: Who was the girl on week 1 that preceded week 2's Kamila Sulewska?:
```
SELECT week_1 FROM table_name_12 WHERE week_2 = "kamila sulewska"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_27703902_9 (high_points VARCHAR, game VARCHAR)
Question: Who had the high points in game is 81?
[/INST]
Here is the SQLite query to answer to the question: Who had the high points in game is 81?:
```
SELECT high_points FROM table_27703902_9 WHERE game = 81
``` |
[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 (react INTEGER, rank VARCHAR, nationality VARCHAR, lane VARCHAR, time VARCHAR)
Question: What's the smallest react of Zimbabwe, ranked after 1 in a lane after 3 and a time less than 20.3?
[/INST]
Here is the SQLite query to answer to the question: What's the smallest react of Zimbabwe, ranked after 1 in a lane after 3 and a time less than 20.3?:
```
SELECT MIN(react) FROM table_name_90 WHERE lane > 3 AND time < 20.3 AND nationality = "zimbabwe" AND rank > 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 (tyre VARCHAR, pole_position VARCHAR, race VARCHAR)
Question: In the Canadian Grand Prix, what tyre was used when Jacky Ickx held pole position?
[/INST]
Here is the SQLite query to answer to the question: In the Canadian Grand Prix, what tyre was used when Jacky Ickx held pole position?:
```
SELECT tyre FROM table_name_50 WHERE pole_position = "jacky ickx" AND race = "canadian grand prix"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_31 (time VARCHAR, record VARCHAR)
Question: when is Record of 66-95?
[/INST]
Here is the SQLite query to answer to the question: when is Record of 66-95?:
```
SELECT time FROM table_name_31 WHERE record = "66-95"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_1342370_10 (party VARCHAR, incumbent VARCHAR)
Question: How many parties were represented for Charles R. Crisp?
[/INST]
Here is the SQLite query to answer to the question: How many parties were represented for Charles R. Crisp?:
```
SELECT COUNT(party) FROM table_1342370_10 WHERE incumbent = "Charles R. Crisp"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_26476336_2 (location VARCHAR, years VARCHAR)
Question: What location is listed from 2005-2010?
[/INST]
Here is the SQLite query to answer to the question: What location is listed from 2005-2010?:
```
SELECT location FROM table_26476336_2 WHERE years = "2005-2010"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_13258876_2 (opponent VARCHAR, attendance VARCHAR)
Question: Who did the Seahawks play when the listed attendance was 61615?
[/INST]
Here is the SQLite query to answer to the question: Who did the Seahawks play when the listed attendance was 61615?:
```
SELECT opponent FROM table_13258876_2 WHERE attendance = 61615
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_77 (position_in_2006 VARCHAR, team VARCHAR)
Question: What was Team Dnepr's position in 2006?
[/INST]
Here is the SQLite query to answer to the question: What was Team Dnepr's position in 2006?:
```
SELECT position_in_2006 FROM table_name_77 WHERE team = "dnepr"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_42 (level INTEGER, example_name VARCHAR, number_of_hus__approximate_ VARCHAR)
Question: What is the mean level number when the example name is lower snake and the approximate number is hus is less than 370?
[/INST]
Here is the SQLite query to answer to the question: What is the mean level number when the example name is lower snake and the approximate number is hus is less than 370?:
```
SELECT AVG(level) FROM table_name_42 WHERE example_name = "lower snake" AND number_of_hus__approximate_ < 370
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_20 (winner VARCHAR, runner_up VARCHAR)
Question: Who was the Winner when the Runner-up was Real Salt Lake?
[/INST]
Here is the SQLite query to answer to the question: Who was the Winner when the Runner-up was Real Salt Lake?:
```
SELECT winner FROM table_name_20 WHERE runner_up = "real salt lake"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_1449169_1 (altitude__mslm_ INTEGER)
Question: What is the minimum altitude (mslm) in all the commons?
[/INST]
Here is the SQLite query to answer to the question: What is the minimum altitude (mslm) in all the commons?:
```
SELECT MIN(altitude__mslm_) FROM table_1449169_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_53 (attendance VARCHAR, game_site VARCHAR)
Question: How many fans attended the game at Bye?
[/INST]
Here is the SQLite query to answer to the question: How many fans attended the game at Bye?:
```
SELECT attendance FROM table_name_53 WHERE game_site = "bye"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_16388398_1 (home_team VARCHAR, away_team VARCHAR)
Question: What was the score for the home team when the away team was Sydney?
[/INST]
Here is the SQLite query to answer to the question: What was the score for the home team when the away team was Sydney?:
```
SELECT home_team AS score FROM table_16388398_1 WHERE away_team = "Sydney"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_73 (rank INTEGER, lane VARCHAR)
Question: What was the rank of the player in lane 6?
[/INST]
Here is the SQLite query to answer to the question: What was the rank of the player in lane 6?:
```
SELECT AVG(rank) FROM table_name_73 WHERE lane = 6
``` |
[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 (authority VARCHAR, name VARCHAR)
Question: What is the Whakamaru school's authority?
[/INST]
Here is the SQLite query to answer to the question: What is the Whakamaru school's authority?:
```
SELECT authority FROM table_name_32 WHERE name = "whakamaru school"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_36 (liberal VARCHAR, dates VARCHAR, polling_firm VARCHAR, prog_cons VARCHAR)
Question: According to the August 2007 poll by the Corporate Research Associates that reported 32% Prog. Cons., what percentage aligned with the Liberal party?
[/INST]
Here is the SQLite query to answer to the question: According to the August 2007 poll by the Corporate Research Associates that reported 32% Prog. Cons., what percentage aligned with the Liberal party?:
```
SELECT liberal FROM table_name_36 WHERE polling_firm = "corporate research associates" AND prog_cons = "32%" AND dates = "august 2007"
``` |
[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 (lane INTEGER, heat VARCHAR, name VARCHAR)
Question: What is the average lane racheal nachula has when the heat is less than 2?
[/INST]
Here is the SQLite query to answer to the question: What is the average lane racheal nachula has when the heat is less than 2?:
```
SELECT AVG(lane) FROM table_name_80 WHERE heat < 2 AND name = "racheal nachula"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_40 (tournament VARCHAR, date VARCHAR)
Question: What is Tournament, when Date is "6 April 1992"?
[/INST]
Here is the SQLite query to answer to the question: What is Tournament, when Date is "6 April 1992"?:
```
SELECT tournament FROM table_name_40 WHERE date = "6 april 1992"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE gymnast (Gymnast_ID VARCHAR); CREATE TABLE people (Hometown VARCHAR, People_ID VARCHAR)
Question: What are the hometowns of gymnasts and the corresponding number of gymnasts?
[/INST]
Here is the SQLite query to answer to the question: What are the hometowns of gymnasts and the corresponding number of gymnasts?:
```
SELECT T2.Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE customer_orders (order_id VARCHAR, order_status VARCHAR); CREATE TABLE order_items (order_quantity INTEGER, order_id VARCHAR)
Question: What is the total number of products that are in orders with status "Cancelled"?
[/INST]
Here is the SQLite query to answer to the question: What is the total number of products that are in orders with status "Cancelled"?:
```
SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_status = "Cancelled"
``` |
[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 (score VARCHAR, tie_no VARCHAR)
Question: What is Score, when Tie No is "109"?
[/INST]
Here is the SQLite query to answer to the question: What is Score, when Tie No is "109"?:
```
SELECT score FROM table_name_67 WHERE tie_no = "109"
``` |
[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 (notes VARCHAR, rank VARCHAR, athlete VARCHAR)
Question: Ioannis Christou with a rank smaller than 6 has what notes?
[/INST]
Here is the SQLite query to answer to the question: Ioannis Christou with a rank smaller than 6 has what notes?:
```
SELECT notes FROM table_name_71 WHERE rank < 6 AND athlete = "ioannis christou"
``` |
[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 (finalist VARCHAR, winner VARCHAR)
Question: Who was the finalist when the winner was First Vienna FC?
[/INST]
Here is the SQLite query to answer to the question: Who was the finalist when the winner was First Vienna FC?:
```
SELECT finalist FROM table_name_83 WHERE winner = "first vienna fc"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_15824796_3 (title VARCHAR, original_air_date VARCHAR)
Question: What is the title of the first episode of the season that begin on february 27, 1954?
[/INST]
Here is the SQLite query to answer to the question: What is the title of the first episode of the season that begin on february 27, 1954?:
```
SELECT title FROM table_15824796_3 WHERE original_air_date = "February 27, 1954"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_77 (date VARCHAR, record VARCHAR)
Question: Question does not make sense since there was no record of 88-74
[/INST]
Here is the SQLite query to answer to the question: Question does not make sense since there was no record of 88-74:
```
SELECT date FROM table_name_77 WHERE record = "88-74"
``` |
[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 (crowd INTEGER, home_team VARCHAR)
Question: What is the sum of all the crowds that watched North Melbourne at home?
[/INST]
Here is the SQLite query to answer to the question: What is the sum of all the crowds that watched North Melbourne at home?:
```
SELECT SUM(crowd) FROM table_name_74 WHERE home_team = "north melbourne"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_23680576_2 (may_2009 VARCHAR, jul_2009 VARCHAR)
Question: If the polling average in July 2009 was 7.2%, what was it in May 2009?
[/INST]
Here is the SQLite query to answer to the question: If the polling average in July 2009 was 7.2%, what was it in May 2009?:
```
SELECT may_2009 FROM table_23680576_2 WHERE jul_2009 = "7.2%"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_2930244_3 (number_of_major_hurricanes VARCHAR, deaths VARCHAR)
Question: When the death is none what is the number of major hurricanes?
[/INST]
Here is the SQLite query to answer to the question: When the death is none what is the number of major hurricanes?:
```
SELECT COUNT(number_of_major_hurricanes) FROM table_2930244_3 WHERE deaths = "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_31 (launched VARCHAR, time_elapsed VARCHAR)
Question: What Launched has Time elapsed of 1991 days (5 yr, 5 mo, 12 d)?
[/INST]
Here is the SQLite query to answer to the question: What Launched has Time elapsed of 1991 days (5 yr, 5 mo, 12 d)?:
```
SELECT launched FROM table_name_31 WHERE time_elapsed = "1991 days (5 yr, 5 mo, 12 d)"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_77 (region VARCHAR, catalog_number VARCHAR)
Question: What is the Region of the release with Catalog number 3 12046 2?
[/INST]
Here is the SQLite query to answer to the question: What is the Region of the release with Catalog number 3 12046 2?:
```
SELECT region FROM table_name_77 WHERE catalog_number = "3 12046 2"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_21457754_2 (total_pts VARCHAR, team_name VARCHAR)
Question: Name the number of total pts for gbr challenge
[/INST]
Here is the SQLite query to answer to the question: Name the number of total pts for gbr challenge:
```
SELECT COUNT(total_pts) FROM table_21457754_2 WHERE team_name = "GBR Challenge"
``` |
[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 (high_points VARCHAR, date VARCHAR)
Question: who had the high points on november 20?
[/INST]
Here is the SQLite query to answer to the question: who had the high points on november 20?:
```
SELECT high_points FROM table_name_61 WHERE date = "november 20"
``` |
[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 (gold INTEGER, silver VARCHAR, total VARCHAR, rank VARCHAR)
Question: What is the largest gold number when the total is less than 3, the rank is 5, and the silver is more than 1?
[/INST]
Here is the SQLite query to answer to the question: What is the largest gold number when the total is less than 3, the rank is 5, and the silver is more than 1?:
```
SELECT MAX(gold) FROM table_name_16 WHERE total < 3 AND rank = "5" AND silver > 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_93 (high_assists VARCHAR, date VARCHAR)
Question: What is High Assists, when Date is "March 10"?
[/INST]
Here is the SQLite query to answer to the question: What is High Assists, when Date is "March 10"?:
```
SELECT high_assists FROM table_name_93 WHERE date = "march 10"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_18847736_2 (opponents INTEGER, opponent VARCHAR)
Question: How many opponents are at Minnesota Vikings?
[/INST]
Here is the SQLite query to answer to the question: How many opponents are at Minnesota Vikings?:
```
SELECT MAX(opponents) FROM table_18847736_2 WHERE opponent = "at Minnesota Vikings"
``` |
[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 (location VARCHAR, score VARCHAR)
Question: Score of 119-115 (ot) involved what location?
[/INST]
Here is the SQLite query to answer to the question: Score of 119-115 (ot) involved what location?:
```
SELECT location FROM table_name_16 WHERE score = "119-115 (ot)"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_11 (place VARCHAR, score VARCHAR)
Question: WHAT IS THE PLACE WITH THE SCORE 69-71-66-73=279?
[/INST]
Here is the SQLite query to answer to the question: WHAT IS THE PLACE WITH THE SCORE 69-71-66-73=279?:
```
SELECT place FROM table_name_11 WHERE score = 69 - 71 - 66 - 73 = 279
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_name_70 (average INTEGER, swimsuit VARCHAR, country VARCHAR)
Question: What is the total average for swimsuits smaller than 9.62 in Colorado?
[/INST]
Here is the SQLite query to answer to the question: What is the total average for swimsuits smaller than 9.62 in Colorado?:
```
SELECT SUM(average) FROM table_name_70 WHERE swimsuit < 9.62 AND country = "colorado"
``` |
[INST] Write SQLite query to answer the following question given the database schema. Please wrap your code answer using ```:
Schema: CREATE TABLE table_29535057_4 (location VARCHAR, big_ten_team VARCHAR)
Question: Where did the games that had Wisconsin as big ten team take place?
[/INST]
Here is the SQLite query to answer to the question: Where did the games that had Wisconsin as big ten team take place?:
```
SELECT location FROM table_29535057_4 WHERE big_ten_team = "Wisconsin"
``` |