input
stringlengths 667
7.62k
| output
stringlengths 41
600
| db_id
stringlengths 3
31
| query
stringlengths 18
577
| question
stringlengths 3
224
| schema
stringlengths 177
6.14k
| primary_keys
stringlengths 16
545
| foreign_keys
stringlengths 16
1.48k
|
---|---|---|---|---|---|---|---|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What si the youngest employee's first and last name?</question>
[SQL]:
|
<SQL_QUERY>SELECT first_name , last_name FROM employees ORDER BY birth_date DESC LIMIT 1;</SQL_QUERY>
|
store_1
|
SELECT first_name , last_name FROM employees ORDER BY birth_date DESC LIMIT 1;
|
What si the youngest employee's first and last name?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List top 10 employee work longest in the company. List employee's first and last name.</question>
[SQL]:
|
<SQL_QUERY>SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10;</SQL_QUERY>
|
store_1
|
SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10;
|
List top 10 employee work longest in the company. List employee's first and last name.
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the first and last names of the top 10 longest-serving employees?</question>
[SQL]:
|
<SQL_QUERY>SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10;</SQL_QUERY>
|
store_1
|
SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10;
|
What are the first and last names of the top 10 longest-serving employees?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the number of employees whose title is IT Staff from each city?</question>
[SQL]:
|
<SQL_QUERY>SELECT count(*) , city FROM employees WHERE title = 'IT Staff' GROUP BY city</SQL_QUERY>
|
store_1
|
SELECT count(*) , city FROM employees WHERE title = 'IT Staff' GROUP BY city
|
Find the number of employees whose title is IT Staff from each city?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many employees who are IT staff are from each city?</question>
[SQL]:
|
<SQL_QUERY>SELECT count(*) , city FROM employees WHERE title = 'IT Staff' GROUP BY city</SQL_QUERY>
|
store_1
|
SELECT count(*) , city FROM employees WHERE title = 'IT Staff' GROUP BY city
|
How many employees who are IT staff are from each city?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.first_name , T2.last_name , count(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY count(T1.reports_to) DESC LIMIT 1;</SQL_QUERY>
|
store_1
|
SELECT T2.first_name , T2.last_name , count(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY count(T1.reports_to) DESC LIMIT 1;
|
Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the first and last names of all the employees and how many people report to them?</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.first_name , T2.last_name , count(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY count(T1.reports_to) DESC LIMIT 1;</SQL_QUERY>
|
store_1
|
SELECT T2.first_name , T2.last_name , count(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY count(T1.reports_to) DESC LIMIT 1;
|
What are the first and last names of all the employees and how many people report to them?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many orders does Lucas Mancini has?</question>
[SQL]:
|
<SQL_QUERY>SELECT count(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "Lucas" AND T1.last_name = "Mancini";</SQL_QUERY>
|
store_1
|
SELECT count(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "Lucas" AND T1.last_name = "Mancini";
|
How many orders does Lucas Mancini has?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many orders does Luca Mancini have in his invoices?</question>
[SQL]:
|
<SQL_QUERY>SELECT count(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "Lucas" AND T1.last_name = "Mancini";</SQL_QUERY>
|
store_1
|
SELECT count(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "Lucas" AND T1.last_name = "Mancini";
|
How many orders does Luca Mancini have in his invoices?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the total amount of money spent by Lucas Mancini?</question>
[SQL]:
|
<SQL_QUERY>SELECT sum(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "Lucas" AND T1.last_name = "Mancini";</SQL_QUERY>
|
store_1
|
SELECT sum(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "Lucas" AND T1.last_name = "Mancini";
|
What is the total amount of money spent by Lucas Mancini?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How much money did Lucas Mancini spend?</question>
[SQL]:
|
<SQL_QUERY>SELECT sum(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "Lucas" AND T1.last_name = "Mancini";</SQL_QUERY>
|
store_1
|
SELECT sum(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "Lucas" AND T1.last_name = "Mancini";
|
How much money did Lucas Mancini spend?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List all media types.</question>
[SQL]:
|
<SQL_QUERY>SELECT name FROM media_types;</SQL_QUERY>
|
store_1
|
SELECT name FROM media_types;
|
List all media types.
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of all the media types?</question>
[SQL]:
|
<SQL_QUERY>SELECT name FROM media_types;</SQL_QUERY>
|
store_1
|
SELECT name FROM media_types;
|
What are the names of all the media types?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List all different genre types.</question>
[SQL]:
|
<SQL_QUERY>SELECT DISTINCT name FROM genres;</SQL_QUERY>
|
store_1
|
SELECT DISTINCT name FROM genres;
|
List all different genre types.
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the different names of the genres?</question>
[SQL]:
|
<SQL_QUERY>SELECT DISTINCT name FROM genres;</SQL_QUERY>
|
store_1
|
SELECT DISTINCT name FROM genres;
|
What are the different names of the genres?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the name of all playlist.</question>
[SQL]:
|
<SQL_QUERY>SELECT name FROM playlists;</SQL_QUERY>
|
store_1
|
SELECT name FROM playlists;
|
List the name of all playlist.
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of all the playlists?</question>
[SQL]:
|
<SQL_QUERY>SELECT name FROM playlists;</SQL_QUERY>
|
store_1
|
SELECT name FROM playlists;
|
What are the names of all the playlists?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Who is the composer of track Fast As a Shark?</question>
[SQL]:
|
<SQL_QUERY>SELECT composer FROM tracks WHERE name = "Fast As a Shark";</SQL_QUERY>
|
store_1
|
SELECT composer FROM tracks WHERE name = "Fast As a Shark";
|
Who is the composer of track Fast As a Shark?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the composer who created the track "Fast As a Shark"?</question>
[SQL]:
|
<SQL_QUERY>SELECT composer FROM tracks WHERE name = "Fast As a Shark";</SQL_QUERY>
|
store_1
|
SELECT composer FROM tracks WHERE name = "Fast As a Shark";
|
What is the composer who created the track "Fast As a Shark"?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How long does track Fast As a Shark has?</question>
[SQL]:
|
<SQL_QUERY>SELECT milliseconds FROM tracks WHERE name = "Fast As a Shark";</SQL_QUERY>
|
store_1
|
SELECT milliseconds FROM tracks WHERE name = "Fast As a Shark";
|
How long does track Fast As a Shark has?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many milliseconds long is Fast As a Shark?</question>
[SQL]:
|
<SQL_QUERY>SELECT milliseconds FROM tracks WHERE name = "Fast As a Shark";</SQL_QUERY>
|
store_1
|
SELECT milliseconds FROM tracks WHERE name = "Fast As a Shark";
|
How many milliseconds long is Fast As a Shark?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the name of tracks whose genre is Rock?</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock";</SQL_QUERY>
|
store_1
|
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock";
|
What is the name of tracks whose genre is Rock?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the name of all tracks in the Rock genre?</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock";</SQL_QUERY>
|
store_1
|
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock";
|
What is the name of all tracks in the Rock genre?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is title of album which track Balls to the Wall belongs to?</question>
[SQL]:
|
<SQL_QUERY>SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = "Balls to the Wall";</SQL_QUERY>
|
store_1
|
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = "Balls to the Wall";
|
What is title of album which track Balls to the Wall belongs to?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the name of the album that has the track Ball to the Wall?</question>
[SQL]:
|
<SQL_QUERY>SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = "Balls to the Wall";</SQL_QUERY>
|
store_1
|
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = "Balls to the Wall";
|
What is the name of the album that has the track Ball to the Wall?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List name of all tracks in Balls to the Wall.</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "Balls to the Wall";</SQL_QUERY>
|
store_1
|
SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "Balls to the Wall";
|
List name of all tracks in Balls to the Wall.
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the name of all tracks in the album named Balls to the Wall?</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "Balls to the Wall";</SQL_QUERY>
|
store_1
|
SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "Balls to the Wall";
|
What is the name of all tracks in the album named Balls to the Wall?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List title of albums have the number of tracks greater than 10.</question>
[SQL]:
|
<SQL_QUERY>SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING count(T1.id) > 10;</SQL_QUERY>
|
store_1
|
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING count(T1.id) > 10;
|
List title of albums have the number of tracks greater than 10.
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of the albums that have more than 10 tracks?</question>
[SQL]:
|
<SQL_QUERY>SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING count(T1.id) > 10;</SQL_QUERY>
|
store_1
|
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING count(T1.id) > 10;
|
What are the names of the albums that have more than 10 tracks?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the name of tracks belongs to genre Rock and whose media type is MPEG audio file.</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" AND T3.name = "MPEG audio file";</SQL_QUERY>
|
store_1
|
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" AND T3.name = "MPEG audio file";
|
List the name of tracks belongs to genre Rock and whose media type is MPEG audio file.
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of all Rock tracks that are stored on MPEG audio files?</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" AND T3.name = "MPEG audio file";</SQL_QUERY>
|
store_1
|
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" AND T3.name = "MPEG audio file";
|
What are the names of all Rock tracks that are stored on MPEG audio files?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the name of tracks belongs to genre Rock or media type is MPEG audio file.</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" OR T3.name = "MPEG audio file";</SQL_QUERY>
|
store_1
|
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" OR T3.name = "MPEG audio file";
|
List the name of tracks belongs to genre Rock or media type is MPEG audio file.
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of all tracks that belong to the Rock genre and whose media type is MPEG?</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" OR T3.name = "MPEG audio file";</SQL_QUERY>
|
store_1
|
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" OR T3.name = "MPEG audio file";
|
What are the names of all tracks that belong to the Rock genre and whose media type is MPEG?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the name of tracks belongs to genre Rock or genre Jazz.</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock" OR T1.name = "Jazz"</SQL_QUERY>
|
store_1
|
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock" OR T1.name = "Jazz"
|
List the name of tracks belongs to genre Rock or genre Jazz.
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of the tracks that are Rock or Jazz songs?</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock" OR T1.name = "Jazz"</SQL_QUERY>
|
store_1
|
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock" OR T1.name = "Jazz"
|
What are the names of the tracks that are Rock or Jazz songs?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the name of all tracks in the playlists of Movies.</question>
[SQL]:
|
<SQL_QUERY>SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = "Movies";</SQL_QUERY>
|
store_1
|
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = "Movies";
|
List the name of all tracks in the playlists of Movies.
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of all tracks that are on playlists titled Movies?</question>
[SQL]:
|
<SQL_QUERY>SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = "Movies";</SQL_QUERY>
|
store_1
|
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = "Movies";
|
What are the names of all tracks that are on playlists titled Movies?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the name of playlist which has number of tracks greater than 100.</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING count(T1.track_id) > 100;</SQL_QUERY>
|
store_1
|
SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING count(T1.track_id) > 100;
|
List the name of playlist which has number of tracks greater than 100.
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of all playlists that have more than 100 tracks?</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING count(T1.track_id) > 100;</SQL_QUERY>
|
store_1
|
SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING count(T1.track_id) > 100;
|
What are the names of all playlists that have more than 100 tracks?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List all tracks bought by customer Daan Peeters.</question>
[SQL]:
|
<SQL_QUERY>SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = "Daan" AND T4.last_name = "Peeters";</SQL_QUERY>
|
store_1
|
SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = "Daan" AND T4.last_name = "Peeters";
|
List all tracks bought by customer Daan Peeters.
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the tracks that Dean Peeters bought?</question>
[SQL]:
|
<SQL_QUERY>SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = "Daan" AND T4.last_name = "Peeters";</SQL_QUERY>
|
store_1
|
SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = "Daan" AND T4.last_name = "Peeters";
|
What are the tracks that Dean Peeters bought?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How much is the track Fast As a Shark?</question>
[SQL]:
|
<SQL_QUERY>SELECT unit_price FROM tracks WHERE name = "Fast As a Shark";</SQL_QUERY>
|
store_1
|
SELECT unit_price FROM tracks WHERE name = "Fast As a Shark";
|
How much is the track Fast As a Shark?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the unit price of the tune "Fast As a Shark"?</question>
[SQL]:
|
<SQL_QUERY>SELECT unit_price FROM tracks WHERE name = "Fast As a Shark";</SQL_QUERY>
|
store_1
|
SELECT unit_price FROM tracks WHERE name = "Fast As a Shark";
|
What is the unit price of the tune "Fast As a Shark"?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the name of tracks which are in Movies playlist but not in music playlist.</question>
[SQL]:
|
<SQL_QUERY>SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'</SQL_QUERY>
|
store_1
|
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'
|
Find the name of tracks which are in Movies playlist but not in music playlist.
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of all tracks that are on the Movies playlist but not in the music playlist?</question>
[SQL]:
|
<SQL_QUERY>SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'</SQL_QUERY>
|
store_1
|
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'
|
What are the names of all tracks that are on the Movies playlist but not in the music playlist?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the name of tracks which are in both Movies and music playlists.</question>
[SQL]:
|
<SQL_QUERY>SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'</SQL_QUERY>
|
store_1
|
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'
|
Find the name of tracks which are in both Movies and music playlists.
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of all the tracks that are in both the Movies and music playlists?</question>
[SQL]:
|
<SQL_QUERY>SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'</SQL_QUERY>
|
store_1
|
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'
|
What are the names of all the tracks that are in both the Movies and music playlists?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find number of tracks in each genre?</question>
[SQL]:
|
<SQL_QUERY>SELECT count(*) , T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;</SQL_QUERY>
|
store_1
|
SELECT count(*) , T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;
|
Find number of tracks in each genre?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);</schema>"
<primary_keys>[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id</primary_keys>"
<foreign_keys>[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many tracks are in each genre?</question>
[SQL]:
|
<SQL_QUERY>SELECT count(*) , T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;</SQL_QUERY>
|
store_1
|
SELECT count(*) , T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;
|
How many tracks are in each genre?
|
[Schema (values) (types)]: | store_1 | artists : id (text) , name (number) | sqlite_sequence : name (text) , seq (number) | albums : id (text) , title (number) , artist_id (text) | employees : id (text) , last_name (number) , first_name (text) , title (text) , reports_to (text) , birth_date (number) , hire_date (text) , address (number) , city (number) , state (text) , country (text) , postal_code (text) , phone (number) , fax (time) , email (time) | customers : id (text) , first_name (number) , last_name (text) , company (text) , address (text) , city (number) , state (text) , country (number) , postal_code (number) , phone (text) , fax (text) , email (text) , support_rep_id (number) | genres : id (text) , name (number) | invoices : id (text) , customer_id (number) , invoice_date (text) , billing_address (text) , billing_city (text) , billing_state (number) , billing_country (text) , billing_postal_code (number) , total (number) | media_types : id (text) , name (number) | tracks : id (text) , name (number) , album_id (text) , media_type_id (text) , genre_id (text) , composer (number) , milliseconds (text) , bytes (number) , unit_price (number) | invoice_lines : id (text) , invoice_id (number) , track_id (text) , unit_price (text) , quantity (text) | playlists : id (text) , name (number) | playlist_tracks : playlist_id (text) , track_id (number);
|
[Primary Keys]: artists : id, sqlite_sequence : id, albums : id, employees : id, customers : id, genres : id, invoices : id, media_types : id, tracks : id, invoice_lines : id, playlists : playlist_id
|
[Foreign Keys]: albums : artist_id = artists : id | employees : reports_to = employees : id | customers : support_rep_id = employees : id | invoices : customer_id = customers : id | tracks : media_type_id = media_types : id | tracks : genre_id = genres : id | tracks : album_id = albums : id | invoice_lines : track_id = tracks : id | invoice_lines : invoice_id = invoices : id | playlist_tracks : track_id = tracks : id | playlist_tracks : playlist_id = playlists : id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);</schema>"
<primary_keys>[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id</primary_keys>"
<foreign_keys>[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many editors are there?</question>
[SQL]:
|
<SQL_QUERY>SELECT count(*) FROM editor</SQL_QUERY>
|
journal_committee
|
SELECT count(*) FROM editor
|
How many editors are there?
|
[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);
|
[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id
|
[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);</schema>"
<primary_keys>[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id</primary_keys>"
<foreign_keys>[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the names of editors in ascending order of age.</question>
[SQL]:
|
<SQL_QUERY>SELECT Name FROM editor ORDER BY Age ASC</SQL_QUERY>
|
journal_committee
|
SELECT Name FROM editor ORDER BY Age ASC
|
List the names of editors in ascending order of age.
|
[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);
|
[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id
|
[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);</schema>"
<primary_keys>[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id</primary_keys>"
<foreign_keys>[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names and ages of editors?</question>
[SQL]:
|
<SQL_QUERY>SELECT Name , Age FROM editor</SQL_QUERY>
|
journal_committee
|
SELECT Name , Age FROM editor
|
What are the names and ages of editors?
|
[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);
|
[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id
|
[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);</schema>"
<primary_keys>[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id</primary_keys>"
<foreign_keys>[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the names of editors who are older than 25.</question>
[SQL]:
|
<SQL_QUERY>SELECT Name FROM editor WHERE Age > 25</SQL_QUERY>
|
journal_committee
|
SELECT Name FROM editor WHERE Age > 25
|
List the names of editors who are older than 25.
|
[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);
|
[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id
|
[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);</schema>"
<primary_keys>[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id</primary_keys>"
<foreign_keys>[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the names of editors of age either 24 or 25.</question>
[SQL]:
|
<SQL_QUERY>SELECT Name FROM editor WHERE Age = 24 OR Age = 25</SQL_QUERY>
|
journal_committee
|
SELECT Name FROM editor WHERE Age = 24 OR Age = 25
|
Show the names of editors of age either 24 or 25.
|
[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);
|
[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id
|
[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);</schema>"
<primary_keys>[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id</primary_keys>"
<foreign_keys>[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the name of the youngest editor?</question>
[SQL]:
|
<SQL_QUERY>SELECT Name FROM editor ORDER BY Age ASC LIMIT 1</SQL_QUERY>
|
journal_committee
|
SELECT Name FROM editor ORDER BY Age ASC LIMIT 1
|
What is the name of the youngest editor?
|
[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);
|
[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id
|
[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);</schema>"
<primary_keys>[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id</primary_keys>"
<foreign_keys>[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the different ages of editors? Show each age along with the number of editors of that age.</question>
[SQL]:
|
<SQL_QUERY>SELECT Age , COUNT(*) FROM editor GROUP BY Age</SQL_QUERY>
|
journal_committee
|
SELECT Age , COUNT(*) FROM editor GROUP BY Age
|
What are the different ages of editors? Show each age along with the number of editors of that age.
|
[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);
|
[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id
|
[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);</schema>"
<primary_keys>[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id</primary_keys>"
<foreign_keys>[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Please show the most common age of editors.</question>
[SQL]:
|
<SQL_QUERY>SELECT Age FROM editor GROUP BY Age ORDER BY COUNT(*) DESC LIMIT 1</SQL_QUERY>
|
journal_committee
|
SELECT Age FROM editor GROUP BY Age ORDER BY COUNT(*) DESC LIMIT 1
|
Please show the most common age of editors.
|
[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);
|
[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id
|
[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);</schema>"
<primary_keys>[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id</primary_keys>"
<foreign_keys>[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the distinct themes of journals.</question>
[SQL]:
|
<SQL_QUERY>SELECT DISTINCT Theme FROM journal</SQL_QUERY>
|
journal_committee
|
SELECT DISTINCT Theme FROM journal
|
Show the distinct themes of journals.
|
[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);
|
[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id
|
[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);</schema>"
<primary_keys>[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id</primary_keys>"
<foreign_keys>[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the names of editors and the theme of journals for which they serve on committees.</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.Name , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID</SQL_QUERY>
|
journal_committee
|
SELECT T2.Name , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID
|
Show the names of editors and the theme of journals for which they serve on committees.
|
[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);
|
[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id
|
[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);</schema>"
<primary_keys>[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id</primary_keys>"
<foreign_keys>[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>For each journal_committee, find the editor name and the journal theme.</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.Name , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID</SQL_QUERY>
|
journal_committee
|
SELECT T2.Name , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID
|
For each journal_committee, find the editor name and the journal theme.
|
[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);
|
[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id
|
[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);</schema>"
<primary_keys>[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id</primary_keys>"
<foreign_keys>[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the names and ages of editors and the theme of journals for which they serve on committees, in ascending alphabetical order of theme.</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.Name , T2.age , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID ORDER BY T3.Theme ASC</SQL_QUERY>
|
journal_committee
|
SELECT T2.Name , T2.age , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID ORDER BY T3.Theme ASC
|
Show the names and ages of editors and the theme of journals for which they serve on committees, in ascending alphabetical order of theme.
|
[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);
|
[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id
|
[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);</schema>"
<primary_keys>[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id</primary_keys>"
<foreign_keys>[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the names of editors that are on the committee of journals with sales bigger than 3000.</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.Name FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID WHERE T3.Sales > 3000</SQL_QUERY>
|
journal_committee
|
SELECT T2.Name FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID WHERE T3.Sales > 3000
|
Show the names of editors that are on the committee of journals with sales bigger than 3000.
|
[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);
|
[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id
|
[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);</schema>"
<primary_keys>[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id</primary_keys>"
<foreign_keys>[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the id, name of each editor and the number of journal committees they are on.</question>
[SQL]:
|
<SQL_QUERY>SELECT T1.editor_id , T1.Name , COUNT(*) FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.editor_id</SQL_QUERY>
|
journal_committee
|
SELECT T1.editor_id , T1.Name , COUNT(*) FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.editor_id
|
Show the id, name of each editor and the number of journal committees they are on.
|
[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);
|
[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id
|
[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);</schema>"
<primary_keys>[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id</primary_keys>"
<foreign_keys>[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the names of editors that are on at least two journal committees.</question>
[SQL]:
|
<SQL_QUERY>SELECT T1.Name FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.Name HAVING COUNT(*) >= 2</SQL_QUERY>
|
journal_committee
|
SELECT T1.Name FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.Name HAVING COUNT(*) >= 2
|
Show the names of editors that are on at least two journal committees.
|
[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);
|
[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id
|
[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);</schema>"
<primary_keys>[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id</primary_keys>"
<foreign_keys>[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the names of editors that are not on any journal committee.</question>
[SQL]:
|
<SQL_QUERY>SELECT Name FROM editor WHERE editor_id NOT IN (SELECT editor_id FROM journal_committee)</SQL_QUERY>
|
journal_committee
|
SELECT Name FROM editor WHERE editor_id NOT IN (SELECT editor_id FROM journal_committee)
|
List the names of editors that are not on any journal committee.
|
[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);
|
[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id
|
[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);</schema>"
<primary_keys>[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id</primary_keys>"
<foreign_keys>[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the date, theme and sales of the journal which did not have any of the listed editors serving on committee.</question>
[SQL]:
|
<SQL_QUERY>SELECT date , theme , sales FROM journal EXCEPT SELECT T1.date , T1.theme , T1.sales FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID</SQL_QUERY>
|
journal_committee
|
SELECT date , theme , sales FROM journal EXCEPT SELECT T1.date , T1.theme , T1.sales FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID
|
List the date, theme and sales of the journal which did not have any of the listed editors serving on committee.
|
[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);
|
[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id
|
[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);</schema>"
<primary_keys>[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id</primary_keys>"
<foreign_keys>[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the average sales of the journals that have an editor whose work type is 'Photo'?</question>
[SQL]:
|
<SQL_QUERY>SELECT avg(T1.sales) FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID WHERE T2.work_type = 'Photo'</SQL_QUERY>
|
journal_committee
|
SELECT avg(T1.sales) FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID WHERE T2.work_type = 'Photo'
|
What is the average sales of the journals that have an editor whose work type is 'Photo'?
|
[Schema (values) (types)]: | journal_committee | journal : journal_id (text) , date (number) , theme (text) , sales (text) | editor : editor_id (text) , name (number) , age (text) | journal_committee : editor_id (text) , journal_id (number) , work_type (text);
|
[Primary Keys]: journal : journal_id, editor : editor_id, journal_committee : editor_id
|
[Foreign Keys]: journal_committee : journal_id = journal : journal_id | journal_committee : editor_id = editor : editor_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many accounts do we have?</question>
[SQL]:
|
<SQL_QUERY>SELECT count(*) FROM Accounts</SQL_QUERY>
|
customers_card_transactions
|
SELECT count(*) FROM Accounts
|
How many accounts do we have?
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of accounts.</question>
[SQL]:
|
<SQL_QUERY>SELECT count(*) FROM Accounts</SQL_QUERY>
|
customers_card_transactions
|
SELECT count(*) FROM Accounts
|
Count the number of accounts.
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show ids, customer ids, names for all accounts.</question>
[SQL]:
|
<SQL_QUERY>SELECT account_id , customer_id , account_name FROM Accounts</SQL_QUERY>
|
customers_card_transactions
|
SELECT account_id , customer_id , account_name FROM Accounts
|
Show ids, customer ids, names for all accounts.
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the account ids, customer ids, and account names for all the accounts?</question>
[SQL]:
|
<SQL_QUERY>SELECT account_id , customer_id , account_name FROM Accounts</SQL_QUERY>
|
customers_card_transactions
|
SELECT account_id , customer_id , account_name FROM Accounts
|
What are the account ids, customer ids, and account names for all the accounts?
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show other account details for account with name 338.</question>
[SQL]:
|
<SQL_QUERY>SELECT other_account_details FROM Accounts WHERE account_name = "338"</SQL_QUERY>
|
customers_card_transactions
|
SELECT other_account_details FROM Accounts WHERE account_name = "338"
|
Show other account details for account with name 338.
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the other account details for the account with the name 338?</question>
[SQL]:
|
<SQL_QUERY>SELECT other_account_details FROM Accounts WHERE account_name = "338"</SQL_QUERY>
|
customers_card_transactions
|
SELECT other_account_details FROM Accounts WHERE account_name = "338"
|
What are the other account details for the account with the name 338?
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the first name, last name, and phone of the customer with account name 162?</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = "162"</SQL_QUERY>
|
customers_card_transactions
|
SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = "162"
|
What is the first name, last name, and phone of the customer with account name 162?
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Give the full name and phone of the customer who has the account name 162.</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = "162"</SQL_QUERY>
|
customers_card_transactions
|
SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = "162"
|
Give the full name and phone of the customer who has the account name 162.
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many accounts does the customer with first name Art and last name Turcotte have?</question>
[SQL]:
|
<SQL_QUERY>SELECT count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte"</SQL_QUERY>
|
customers_card_transactions
|
SELECT count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte"
|
How many accounts does the customer with first name Art and last name Turcotte have?
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the number of accounts that the customer with the first name Art and last name Turcotte has.</question>
[SQL]:
|
<SQL_QUERY>SELECT count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte"</SQL_QUERY>
|
customers_card_transactions
|
SELECT count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte"
|
Return the number of accounts that the customer with the first name Art and last name Turcotte has.
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show all customer ids and the number of accounts for each customer.</question>
[SQL]:
|
<SQL_QUERY>SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id</SQL_QUERY>
|
customers_card_transactions
|
SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id
|
Show all customer ids and the number of accounts for each customer.
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many accounts are there for each customer id?</question>
[SQL]:
|
<SQL_QUERY>SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id</SQL_QUERY>
|
customers_card_transactions
|
SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id
|
How many accounts are there for each customer id?
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the customer id and number of accounts with most accounts.</question>
[SQL]:
|
<SQL_QUERY>SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>
|
customers_card_transactions
|
SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1
|
Show the customer id and number of accounts with most accounts.
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the customer id of the customer with the most accounts, and how many accounts does this person have?</question>
[SQL]:
|
<SQL_QUERY>SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>
|
customers_card_transactions
|
SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1
|
What is the customer id of the customer with the most accounts, and how many accounts does this person have?
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the customer first, last name and id with least number of accounts.</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.customer_first_name , T2.customer_last_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1</SQL_QUERY>
|
customers_card_transactions
|
SELECT T2.customer_first_name , T2.customer_last_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1
|
What is the customer first, last name and id with least number of accounts.
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Give the full name and customer id of the customer with the fewest accounts.</question>
[SQL]:
|
<SQL_QUERY>SELECT T2.customer_first_name , T2.customer_last_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1</SQL_QUERY>
|
customers_card_transactions
|
SELECT T2.customer_first_name , T2.customer_last_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1
|
Give the full name and customer id of the customer with the fewest accounts.
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the number of all customers without an account.</question>
[SQL]:
|
<SQL_QUERY>SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)</SQL_QUERY>
|
customers_card_transactions
|
SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)
|
Show the number of all customers without an account.
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many customers do not have an account?</question>
[SQL]:
|
<SQL_QUERY>SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)</SQL_QUERY>
|
customers_card_transactions
|
SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)
|
How many customers do not have an account?
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the first names and last names of customers without any account.</question>
[SQL]:
|
<SQL_QUERY>SELECT customer_first_name , customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id</SQL_QUERY>
|
customers_card_transactions
|
SELECT customer_first_name , customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id
|
Show the first names and last names of customers without any account.
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the full names of customers who do not have any accounts?</question>
[SQL]:
|
<SQL_QUERY>SELECT customer_first_name , customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id</SQL_QUERY>
|
customers_card_transactions
|
SELECT customer_first_name , customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id
|
What are the full names of customers who do not have any accounts?
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show distinct first and last names for all customers with an account.</question>
[SQL]:
|
<SQL_QUERY>SELECT DISTINCT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id</SQL_QUERY>
|
customers_card_transactions
|
SELECT DISTINCT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id
|
Show distinct first and last names for all customers with an account.
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the full names of customers who have accounts?</question>
[SQL]:
|
<SQL_QUERY>SELECT DISTINCT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id</SQL_QUERY>
|
customers_card_transactions
|
SELECT DISTINCT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id
|
What are the full names of customers who have accounts?
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many customers have an account?</question>
[SQL]:
|
<SQL_QUERY>SELECT count(DISTINCT customer_id) FROM Accounts</SQL_QUERY>
|
customers_card_transactions
|
SELECT count(DISTINCT customer_id) FROM Accounts
|
How many customers have an account?
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of customers who hold an account.</question>
[SQL]:
|
<SQL_QUERY>SELECT count(DISTINCT customer_id) FROM Accounts</SQL_QUERY>
|
customers_card_transactions
|
SELECT count(DISTINCT customer_id) FROM Accounts
|
Count the number of customers who hold an account.
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many customers do we have?</question>
[SQL]:
|
<SQL_QUERY>SELECT count(*) FROM Customers</SQL_QUERY>
|
customers_card_transactions
|
SELECT count(*) FROM Customers
|
How many customers do we have?
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of customers.</question>
[SQL]:
|
<SQL_QUERY>SELECT count(*) FROM Customers</SQL_QUERY>
|
customers_card_transactions
|
SELECT count(*) FROM Customers
|
Count the number of customers.
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show ids, first names, last names, and phones for all customers.</question>
[SQL]:
|
<SQL_QUERY>SELECT customer_id , customer_first_name , customer_last_name , customer_phone FROM Customers</SQL_QUERY>
|
customers_card_transactions
|
SELECT customer_id , customer_first_name , customer_last_name , customer_phone FROM Customers
|
Show ids, first names, last names, and phones for all customers.
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the ids, full names, and phones of each customer?</question>
[SQL]:
|
<SQL_QUERY>SELECT customer_id , customer_first_name , customer_last_name , customer_phone FROM Customers</SQL_QUERY>
|
customers_card_transactions
|
SELECT customer_id , customer_first_name , customer_last_name , customer_phone FROM Customers
|
What are the ids, full names, and phones of each customer?
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the phone and email for customer with first name Aniyah and last name Feest?</question>
[SQL]:
|
<SQL_QUERY>SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = "Aniyah" AND customer_last_name = "Feest"</SQL_QUERY>
|
customers_card_transactions
|
SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = "Aniyah" AND customer_last_name = "Feest"
|
What is the phone and email for customer with first name Aniyah and last name Feest?
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the phone and email of the customer with the first name Aniyah and last name Feest.</question>
[SQL]:
|
<SQL_QUERY>SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = "Aniyah" AND customer_last_name = "Feest"</SQL_QUERY>
|
customers_card_transactions
|
SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = "Aniyah" AND customer_last_name = "Feest"
|
Return the phone and email of the customer with the first name Aniyah and last name Feest.
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the number of customer cards.</question>
[SQL]:
|
<SQL_QUERY>SELECT count(*) FROM Customers_cards</SQL_QUERY>
|
customers_card_transactions
|
SELECT count(*) FROM Customers_cards
|
Show the number of customer cards.
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many customer cards are there?</question>
[SQL]:
|
<SQL_QUERY>SELECT count(*) FROM Customers_cards</SQL_QUERY>
|
customers_card_transactions
|
SELECT count(*) FROM Customers_cards
|
How many customer cards are there?
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);</schema>"
<primary_keys>[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id</primary_keys>"
<foreign_keys>[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show ids, customer ids, card type codes, card numbers for all cards.</question>
[SQL]:
|
<SQL_QUERY>SELECT card_id , customer_id , card_type_code , card_number FROM Customers_cards</SQL_QUERY>
|
customers_card_transactions
|
SELECT card_id , customer_id , card_type_code , card_number FROM Customers_cards
|
Show ids, customer ids, card type codes, card numbers for all cards.
|
[Schema (values) (types)]: | customers_card_transactions | Accounts : account_id (text) , customer_id (number) , account_name (number) , other_account_details (text) | Customers : customer_id (text) , customer_first_name (number) , customer_last_name (number) , customer_address (text) , customer_phone (text) , customer_email (number) , other_customer_details (text) | Customers_Cards : card_id (text) , customer_id (number) , card_type_code (number) , card_number (text) , date_valid_from (text) , date_valid_to (number) , other_card_details (text) | Financial_Transactions : transaction_id (text) , previous_transaction_id (number) , account_id (number) , card_id (text) , transaction_type (text) , transaction_date (number) , transaction_amount (text) , transaction_comment (text) , other_transaction_details (text);
|
[Primary Keys]: accounts : account_id, customers : customer_id, customers_cards : card_id
|
[Foreign Keys]: financial_transactions : account_id = accounts : account_id | financial_transactions : card_id = customers_cards : card_id
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.