MMTU-benchmark/MMTU huggingface dataset:
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
boat_1

Tables:

Table: Sailors
|   sid | name   |   rating |   age |
|------:|:-------|---------:|------:|
|     1 | Eugene |        7 |    22 |
|     2 | Luis   |        2 |    39 |
|     3 | Ken    |        8 |    27 |


Table: Boats
|   bid | name   | color   |
|------:|:-------|:--------|
|   101 | Legacy | red     |
|   102 | Melon  | blue    |
|   103 | Mars   | red     |


Table: Reserves
|   sid |   bid | day   |
|------:|------:|:------|
|     1 |   102 | 9/12  |
|     2 |   102 | 9/13  |
|     2 |   103 | 9/14  |
|     2 |   103 | 9/15  |


Question: Find the id of Sailors (sid) that reserved red and blue boat.

db_id: boat_1
tables: name: Sailors
data: Sailors.csv
name: Boats
data: Boats.csv
name: Reserves
data: Reserves.csv
label: SELECT DISTINCT T2.sid FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid WHERE T1.color  =  'red' INTERSECT SELECT DISTINCT T2.sid FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid WHERE T1.color  =  "blue"
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/boat_1/boat_1.sqlite
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
boat_1

Tables:

Table: Sailors
|   sid | name   |   rating |   age |
|------:|:-------|---------:|------:|
|     1 | Eugene |        7 |    22 |
|     2 | Luis   |        2 |    39 |
|     3 | Ken    |        8 |    27 |


Table: Boats
|   bid | name   | color   |
|------:|:-------|:--------|
|   101 | Legacy | red     |
|   102 | Melon  | blue    |
|   103 | Mars   | red     |


Table: Reserves
|   sid |   bid | day   |
|------:|------:|:------|
|     1 |   102 | 9/12  |
|     2 |   102 | 9/13  |
|     2 |   103 | 9/14  |
|     2 |   103 | 9/15  |


Question: What is average age of all sailors who have a rating of 7?

db_id: boat_1
tables: name: Sailors
data: Sailors.csv
name: Boats
data: Boats.csv
name: Reserves
data: Reserves.csv
label: SELECT AVG(age) FROM Sailors WHERE rating  =  7
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/boat_1/boat_1.sqlite
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
pilot_1

Tables:

Table: PilotSkills
| pilot_name   | plane_name   |   age |
|:-------------|:-------------|------:|
| Celko        | Piper Cub    |    23 |
| Higgins      | B-52 Bomber  |    34 |
| Higgins      | F-14 Fighter |    50 |
| Higgins      | Piper Cub    |    30 |
| Jones        | B-52 Bomber  |    24 |
| Jones        | F-14 Fighter |    32 |
| Smith        | B-1 Bomber   |    41 |
| Smith        | B-52 Bomber  |    26 |
| Smith        | F-14 Fighter |    45 |
| Wilson       | B-1 Bomber   |    52 |


Table: Hangar
| plane_name   | location   |
|:-------------|:-----------|
| B-1 Bomber   | Chicago    |
| B-52 Bomber  | Austin     |
| F-14 Fighter | Boston     |
| Piper Cub    | Seattle    |


Question: How many pilots whose planes are in Chicago?

db_id: pilot_1
tables: name: PilotSkills
data: PilotSkills.csv
name: Hangar
data: Hangar.csv
label: SELECT 	count(DISTINCT T1.pilot_name) FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T2.location  =  'Chicago'
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/pilot_1/pilot_1.sqlite
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
warehouse_1

Tables:

Table: Warehouses
|   Code | Location      |   Capacity |
|-------:|:--------------|-----------:|
|      1 | Chicago       |          3 |
|      2 | Chicago       |          4 |
|      3 | New York      |          7 |
|      4 | Los Angeles   |          2 |
|      5 | San Francisco |          8 |


Table: Boxes
| Code   | Contents   |   Value |   Warehouse |
|:-------|:-----------|--------:|------------:|
| 0MN7   | Rocks      |     180 |           3 |
| 4H8P   | Rocks      |     250 |           1 |
| 4RT3   | Scissors   |     190 |           4 |
| 7G3H   | Rocks      |     200 |           1 |
| 8JN6   | Papers     |      75 |           1 |
| 8Y6U   | Papers     |      50 |           3 |
| 9J6F   | Papers     |     175 |           2 |
| LL08   | Rocks      |     140 |           4 |
| P0H6   | Scissors   |     125 |           1 |
| P2T6   | Scissors   |     150 |           2 |


Question: Find the total value and number of boxes for each content type.

db_id: warehouse_1
tables: name: Warehouses
data: Warehouses.csv
name: Boxes
data: Boxes.csv
label: SELECT sum(value) ,  count(*) ,  CONTENTS FROM boxes GROUP BY CONTENTS
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/warehouse_1/warehouse_1.sqlite
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
warehouse_1

Tables:

Table: Warehouses
|   Code | Location      |   Capacity |
|-------:|:--------------|-----------:|
|      1 | Chicago       |          3 |
|      2 | Chicago       |          4 |
|      3 | New York      |          7 |
|      4 | Los Angeles   |          2 |
|      5 | San Francisco |          8 |


Table: Boxes
| Code   | Contents   |   Value |   Warehouse |
|:-------|:-----------|--------:|------------:|
| 0MN7   | Rocks      |     180 |           3 |
| 4H8P   | Rocks      |     250 |           1 |
| 4RT3   | Scissors   |     190 |           4 |
| 7G3H   | Rocks      |     200 |           1 |
| 8JN6   | Papers     |      75 |           1 |
| 8Y6U   | Papers     |      50 |           3 |
| 9J6F   | Papers     |     175 |           2 |
| LL08   | Rocks      |     140 |           4 |
| P0H6   | Scissors   |     125 |           1 |
| P2T6   | Scissors   |     150 |           2 |


Question: What are the average and maximum values for each type of content in boxes?

db_id: warehouse_1
tables: name: Warehouses
data: Warehouses.csv
name: Boxes
data: Boxes.csv
label: SELECT avg(value) ,  max(value) ,  CONTENTS FROM boxes GROUP BY CONTENTS
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/warehouse_1/warehouse_1.sqlite
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
pilot_1

Tables:

Table: PilotSkills
| pilot_name   | plane_name   |   age |
|:-------------|:-------------|------:|
| Celko        | Piper Cub    |    23 |
| Higgins      | B-52 Bomber  |    34 |
| Higgins      | F-14 Fighter |    50 |
| Higgins      | Piper Cub    |    30 |
| Jones        | B-52 Bomber  |    24 |
| Jones        | F-14 Fighter |    32 |
| Smith        | B-1 Bomber   |    41 |
| Smith        | B-52 Bomber  |    26 |
| Smith        | F-14 Fighter |    45 |
| Wilson       | B-1 Bomber   |    52 |


Table: Hangar
| plane_name   | location   |
|:-------------|:-----------|
| B-1 Bomber   | Chicago    |
| B-52 Bomber  | Austin     |
| F-14 Fighter | Boston     |
| Piper Cub    | Seattle    |


Question: What is the name of the plane that is flown the least often?

db_id: pilot_1
tables: name: PilotSkills
data: PilotSkills.csv
name: Hangar
data: Hangar.csv
label: SELECT plane_name FROM pilotskills GROUP BY plane_name ORDER BY count(*) LIMIT 1
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/pilot_1/pilot_1.sqlite
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
pilot_1

Tables:

Table: PilotSkills
| pilot_name   | plane_name   |   age |
|:-------------|:-------------|------:|
| Celko        | Piper Cub    |    23 |
| Higgins      | B-52 Bomber  |    34 |
| Higgins      | F-14 Fighter |    50 |
| Higgins      | Piper Cub    |    30 |
| Jones        | B-52 Bomber  |    24 |
| Jones        | F-14 Fighter |    32 |
| Smith        | B-1 Bomber   |    41 |
| Smith        | B-52 Bomber  |    26 |
| Smith        | F-14 Fighter |    45 |
| Wilson       | B-1 Bomber   |    52 |


Table: Hangar
| plane_name   | location   |
|:-------------|:-----------|
| B-1 Bomber   | Chicago    |
| B-52 Bomber  | Austin     |
| F-14 Fighter | Boston     |
| Piper Cub    | Seattle    |


Question: Return the names of planes owned by the pilot whose name is Smith and is 41 years old.

db_id: pilot_1
tables: name: PilotSkills
data: PilotSkills.csv
name: Hangar
data: Hangar.csv
label: SELECT plane_name FROM pilotskills WHERE pilot_name  =  'Smith' AND age  =  41
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/pilot_1/pilot_1.sqlite
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
pilot_1

Tables:

Table: PilotSkills
| pilot_name   | plane_name   |   age |
|:-------------|:-------------|------:|
| Celko        | Piper Cub    |    23 |
| Higgins      | B-52 Bomber  |    34 |
| Higgins      | F-14 Fighter |    50 |
| Higgins      | Piper Cub    |    30 |
| Jones        | B-52 Bomber  |    24 |
| Jones        | F-14 Fighter |    32 |
| Smith        | B-1 Bomber   |    41 |
| Smith        | B-52 Bomber  |    26 |
| Smith        | F-14 Fighter |    45 |
| Wilson       | B-1 Bomber   |    52 |


Table: Hangar
| plane_name   | location   |
|:-------------|:-----------|
| B-1 Bomber   | Chicago    |
| B-52 Bomber  | Austin     |
| F-14 Fighter | Boston     |
| Piper Cub    | Seattle    |


Question: Count the number of B-52 Bombers owned by pilots under 35.

db_id: pilot_1
tables: name: PilotSkills
data: PilotSkills.csv
name: Hangar
data: Hangar.csv
label: SELECT count(*) FROM pilotskills WHERE age  <  35 AND plane_name  =  'B-52 Bomber'
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/pilot_1/pilot_1.sqlite
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
boat_1

Tables:

Table: Sailors
|   sid | name   |   rating |   age |
|------:|:-------|---------:|------:|
|     1 | Eugene |        7 |    22 |
|     2 | Luis   |        2 |    39 |
|     3 | Ken    |        8 |    27 |


Table: Boats
|   bid | name   | color   |
|------:|:-------|:--------|
|   101 | Legacy | red     |
|   102 | Melon  | blue    |
|   103 | Mars   | red     |


Table: Reserves
|   sid |   bid | day   |
|------:|------:|:------|
|     1 |   102 | 9/12  |
|     2 |   102 | 9/13  |
|     2 |   103 | 9/14  |
|     2 |   103 | 9/15  |


Question: What is the name of all sailors whose rating is higher than all sailors named Luis?

db_id: boat_1
tables: name: Sailors
data: Sailors.csv
name: Boats
data: Boats.csv
name: Reserves
data: Reserves.csv
label: SELECT name FROM Sailors WHERE rating  >  (SELECT max(rating) FROM Sailors WHERE name  =  'Luis')
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/boat_1/boat_1.sqlite
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
pilot_1

Tables:

Table: PilotSkills
| pilot_name   | plane_name   |   age |
|:-------------|:-------------|------:|
| Celko        | Piper Cub    |    23 |
| Higgins      | B-52 Bomber  |    34 |
| Higgins      | F-14 Fighter |    50 |
| Higgins      | Piper Cub    |    30 |
| Jones        | B-52 Bomber  |    24 |
| Jones        | F-14 Fighter |    32 |
| Smith        | B-1 Bomber   |    41 |
| Smith        | B-52 Bomber  |    26 |
| Smith        | F-14 Fighter |    45 |
| Wilson       | B-1 Bomber   |    52 |


Table: Hangar
| plane_name   | location   |
|:-------------|:-----------|
| B-1 Bomber   | Chicago    |
| B-52 Bomber  | Austin     |
| F-14 Fighter | Boston     |
| Piper Cub    | Seattle    |


Question: What are the different plane names, ordered alphabetically?

db_id: pilot_1
tables: name: PilotSkills
data: PilotSkills.csv
name: Hangar
data: Hangar.csv
label: SELECT DISTINCT plane_name FROM pilotskills ORDER BY plane_name
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/pilot_1/pilot_1.sqlite
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
book_review

Tables:

Table: book
|   Book_ID | Title                | Type   |   Pages |   Chapters | Audio   | Release       |
|----------:|:---------------------|:-------|--------:|-----------:|:--------|:--------------|
|         1 | A Game of Thrones    | Novel  |     704 |         73 | 33h 53m | August 1996   |
|         2 | A Clash of Kings     | Novel  |     768 |         70 | 37h 17m | February 1999 |
|         3 | A Storm of Swords    | Novel  |     992 |         82 | 47h 37m | November 2000 |
|         4 | A Feast for Crows    | Novel  |     753 |         46 | 31h 10m | November 2005 |
|         5 | A Dance with Dragons | Poet   |    1056 |         73 | 48h 56m | July 2011     |


Table: review
|   Review_ID |   Book_ID |   Rating |   Readers_in_Million |   Rank |
|------------:|----------:|---------:|---------------------:|-------:|
|           1 |         1 |      6.6 |                  3.3 |     16 |
|           2 |         3 |      5.7 |                  2.8 |     25 |
|           3 |         4 |      5.8 |                  2.6 |     26 |
|           4 |         5 |      5.6 |                  2.4 |     35 |


Question: What are the types of books that have at least three books belonging to?

db_id: book_review
tables: name: book
data: book.csv
name: review
data: review.csv
label: SELECT TYPE FROM book GROUP BY TYPE HAVING COUNT(*)  >=  3
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/book_review/book_review.sqlite
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
pilot_1

Tables:

Table: PilotSkills
| pilot_name   | plane_name   |   age |
|:-------------|:-------------|------:|
| Celko        | Piper Cub    |    23 |
| Higgins      | B-52 Bomber  |    34 |
| Higgins      | F-14 Fighter |    50 |
| Higgins      | Piper Cub    |    30 |
| Jones        | B-52 Bomber  |    24 |
| Jones        | F-14 Fighter |    32 |
| Smith        | B-1 Bomber   |    41 |
| Smith        | B-52 Bomber  |    26 |
| Smith        | F-14 Fighter |    45 |
| Wilson       | B-1 Bomber   |    52 |


Table: Hangar
| plane_name   | location   |
|:-------------|:-----------|
| B-1 Bomber   | Chicago    |
| B-52 Bomber  | Austin     |
| F-14 Fighter | Boston     |
| Piper Cub    | Seattle    |


Question: Find the number of pilots whose age is younger than all pilots whose plane is F-14 Fighter.

db_id: pilot_1
tables: name: PilotSkills
data: PilotSkills.csv
name: Hangar
data: Hangar.csv
label: SELECT count(*) FROM pilotskills WHERE age  <  (SELECT min(age) FROM pilotskills WHERE plane_name  =  'F-14 Fighter')
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/pilot_1/pilot_1.sqlite
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
boat_1

Tables:

Table: Sailors
|   sid | name   |   rating |   age |
|------:|:-------|---------:|------:|
|     1 | Eugene |        7 |    22 |
|     2 | Luis   |        2 |    39 |
|     3 | Ken    |        8 |    27 |


Table: Boats
|   bid | name   | color   |
|------:|:-------|:--------|
|   101 | Legacy | red     |
|   102 | Melon  | blue    |
|   103 | Mars   | red     |


Table: Reserves
|   sid |   bid | day   |
|------:|------:|:------|
|     1 |   102 | 9/12  |
|     2 |   102 | 9/13  |
|     2 |   103 | 9/14  |
|     2 |   103 | 9/15  |


Question: Find boats reserved by Sailor with id 1.

db_id: boat_1
tables: name: Sailors
data: Sailors.csv
name: Boats
data: Boats.csv
name: Reserves
data: Reserves.csv
label: SELECT DISTINCT bid FROM Reserves WHERE sid = 1
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/boat_1/boat_1.sqlite
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
warehouse_1

Tables:

Table: Warehouses
|   Code | Location      |   Capacity |
|-------:|:--------------|-----------:|
|      1 | Chicago       |          3 |
|      2 | Chicago       |          4 |
|      3 | New York      |          7 |
|      4 | Los Angeles   |          2 |
|      5 | San Francisco |          8 |


Table: Boxes
| Code   | Contents   |   Value |   Warehouse |
|:-------|:-----------|--------:|------------:|
| 0MN7   | Rocks      |     180 |           3 |
| 4H8P   | Rocks      |     250 |           1 |
| 4RT3   | Scissors   |     190 |           4 |
| 7G3H   | Rocks      |     200 |           1 |
| 8JN6   | Papers     |      75 |           1 |
| 8Y6U   | Papers     |      50 |           3 |
| 9J6F   | Papers     |     175 |           2 |
| LL08   | Rocks      |     140 |           4 |
| P0H6   | Scissors   |     125 |           1 |
| P2T6   | Scissors   |     150 |           2 |


Question: What are the locations of warehouses in which boxes that contain Rocks and Scissors are kept?

db_id: warehouse_1
tables: name: Warehouses
data: Warehouses.csv
name: Boxes
data: Boxes.csv
label: SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T1.contents  =  'Rocks' INTERSECT SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T1.contents  =  'Scissors'
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/warehouse_1/warehouse_1.sqlite
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
warehouse_1

Tables:

Table: Warehouses
|   Code | Location      |   Capacity |
|-------:|:--------------|-----------:|
|      1 | Chicago       |          3 |
|      2 | Chicago       |          4 |
|      3 | New York      |          7 |
|      4 | Los Angeles   |          2 |
|      5 | San Francisco |          8 |


Table: Boxes
| Code   | Contents   |   Value |   Warehouse |
|:-------|:-----------|--------:|------------:|
| 0MN7   | Rocks      |     180 |           3 |
| 4H8P   | Rocks      |     250 |           1 |
| 4RT3   | Scissors   |     190 |           4 |
| 7G3H   | Rocks      |     200 |           1 |
| 8JN6   | Papers     |      75 |           1 |
| 8Y6U   | Papers     |      50 |           3 |
| 9J6F   | Papers     |     175 |           2 |
| LL08   | Rocks      |     140 |           4 |
| P0H6   | Scissors   |     125 |           1 |
| P2T6   | Scissors   |     150 |           2 |


Question: Select the codes of all warehouses that are above capacity.

db_id: warehouse_1
tables: name: Warehouses
data: Warehouses.csv
name: Boxes
data: Boxes.csv
label: SELECT T2.code FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse  =  T2.code GROUP BY T2.code HAVING count(*)  >  T2.capacity
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/warehouse_1/warehouse_1.sqlite
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
book_review

Tables:

Table: book
|   Book_ID | Title                | Type   |   Pages |   Chapters | Audio   | Release       |
|----------:|:---------------------|:-------|--------:|-----------:|:--------|:--------------|
|         1 | A Game of Thrones    | Novel  |     704 |         73 | 33h 53m | August 1996   |
|         2 | A Clash of Kings     | Novel  |     768 |         70 | 37h 17m | February 1999 |
|         3 | A Storm of Swords    | Novel  |     992 |         82 | 47h 37m | November 2000 |
|         4 | A Feast for Crows    | Novel  |     753 |         46 | 31h 10m | November 2005 |
|         5 | A Dance with Dragons | Poet   |    1056 |         73 | 48h 56m | July 2011     |


Table: review
|   Review_ID |   Book_ID |   Rating |   Readers_in_Million |   Rank |
|------------:|----------:|---------:|---------------------:|-------:|
|           1 |         1 |      6.6 |                  3.3 |     16 |
|           2 |         3 |      5.7 |                  2.8 |     25 |
|           3 |         4 |      5.8 |                  2.6 |     26 |
|           4 |         5 |      5.6 |                  2.4 |     35 |


Question: How many books are there?

db_id: book_review
tables: name: book
data: book.csv
name: review
data: review.csv
label: SELECT count(*) FROM book
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/book_review/book_review.sqlite
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
movie_2

Tables:

Table: Movies
|   Code | Title                   | Rating   |
|-------:|:------------------------|:---------|
|      1 | Citizen Kane            | PG       |
|      2 | Singin' in the Rain     | G        |
|      3 | The Wizard of Oz        | G        |
|      4 | The Quiet Man           |          |
|      5 | North by Northwest      |          |
|      6 | The Last Tango in Paris | NC-17    |
|      7 | Some Like it Hot        | PG-13    |
|      8 | A Night at the Opera    |          |


Table: MovieTheaters
|   Code | Name        | Movie   |
|-------:|:------------|:--------|
|      1 | Odeon       | 5.0     |
|      2 | Imperial    | 1.0     |
|      3 | Majestic    |         |
|      4 | Royale      | 6.0     |
|      5 | Paraiso     | 3.0     |
|      6 | Nickelodeon |         |


Question: What are all of the movie names?

db_id: movie_2
tables: name: Movies
data: Movies.csv
name: MovieTheaters
data: MovieTheaters.csv
label: SELECT title FROM movies
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/movie_2/movie_2.sqlite
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
pilot_1

Tables:

Table: PilotSkills
| pilot_name   | plane_name   |   age |
|:-------------|:-------------|------:|
| Celko        | Piper Cub    |    23 |
| Higgins      | B-52 Bomber  |    34 |
| Higgins      | F-14 Fighter |    50 |
| Higgins      | Piper Cub    |    30 |
| Jones        | B-52 Bomber  |    24 |
| Jones        | F-14 Fighter |    32 |
| Smith        | B-1 Bomber   |    41 |
| Smith        | B-52 Bomber  |    26 |
| Smith        | F-14 Fighter |    45 |
| Wilson       | B-1 Bomber   |    52 |


Table: Hangar
| plane_name   | location   |
|:-------------|:-----------|
| B-1 Bomber   | Chicago    |
| B-52 Bomber  | Austin     |
| F-14 Fighter | Boston     |
| Piper Cub    | Seattle    |


Question: Find the max age for each group of pilots with the same name.

db_id: pilot_1
tables: name: PilotSkills
data: PilotSkills.csv
name: Hangar
data: Hangar.csv
label: SELECT max(age) ,  pilot_name FROM pilotskills GROUP BY pilot_name
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/pilot_1/pilot_1.sqlite
Task: NL2SQL (source dataset: Spider)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
boat_1

Tables:

Table: Sailors
|   sid | name   |   rating |   age |
|------:|:-------|---------:|------:|
|     1 | Eugene |        7 |    22 |
|     2 | Luis   |        2 |    39 |
|     3 | Ken    |        8 |    27 |


Table: Boats
|   bid | name   | color   |
|------:|:-------|:--------|
|   101 | Legacy | red     |
|   102 | Melon  | blue    |
|   103 | Mars   | red     |


Table: Reserves
|   sid |   bid | day   |
|------:|------:|:------|
|     1 |   102 | 9/12  |
|     2 |   102 | 9/13  |
|     2 |   103 | 9/14  |
|     2 |   103 | 9/15  |


Question: What are the average rating and max age of all sailors?

db_id: boat_1
tables: name: Sailors
data: Sailors.csv
name: Boats
data: Boats.csv
name: Reserves
data: Reserves.csv
label: SELECT AVG(rating) ,  MAX(age) FROM Sailors
sqlite_path: $MMTU_HOME/data_sqlite/spider/spider_data/test_database/boat_1/boat_1.sqlite