Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: How much money did Lucas Mancini spend? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: List all media types. [/INST]

Output: SELECT name FROM media_types;


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What are the names of all the media types? [/INST]

Output: SELECT name FROM media_types;


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: List all different genre types. [/INST]

Output: SELECT DISTINCT name FROM genres;


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What are the different names of the genres? [/INST]

Output: SELECT DISTINCT name FROM genres;


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: List the name of all playlist. [/INST]

Output: SELECT name FROM playlists;


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What are the names of all the playlists? [/INST]

Output: SELECT name FROM playlists;


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: Who is the composer of track Fast As a Shark? [/INST]

Output: SELECT composer FROM tracks WHERE name = "Fast As a Shark";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What is the composer who created the track "Fast As a Shark"? [/INST]

Output: SELECT composer FROM tracks WHERE name = "Fast As a Shark";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: How long does track Fast As a Shark has? [/INST]

Output: SELECT milliseconds FROM tracks WHERE name = "Fast As a Shark";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: How many milliseconds long is Fast As a Shark? [/INST]

Output: SELECT milliseconds FROM tracks WHERE name = "Fast As a Shark";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What is the name of tracks whose genre is Rock? [/INST]

Output: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What is the name of all tracks in the Rock genre? [/INST]

Output: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What is title of album which track Balls to the Wall belongs to? [/INST]

Output: SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = "Balls to the Wall";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What is the name of the album that has the track Ball to the Wall? [/INST]

Output: SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = "Balls to the Wall";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: List name of all tracks in Balls to the Wall. [/INST]

Output: SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "Balls to the Wall";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What is the name of all tracks in the album named Balls to the Wall? [/INST]

Output: SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "Balls to the Wall";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: List title of albums have the number of tracks greater than 10. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What are the names of the albums that have more than 10 tracks? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: List the name of tracks belongs to genre Rock and whose media type is MPEG audio file. [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What are the names of all Rock tracks that are stored on MPEG audio files? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: List the name of tracks belongs to genre Rock or media type is MPEG audio file. [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What are the names of all tracks that belong to the Rock genre and whose media type is MPEG? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: List the name of tracks belongs to genre Rock or genre Jazz. [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What are the names of the tracks that are Rock or Jazz songs? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: List the name of all tracks in the playlists of Movies. [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What are the names of all tracks that are on playlists titled Movies? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: List the name of playlist which has number of tracks greater than 100. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What are the names of all playlists that have more than 100 tracks? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: List all tracks bought by customer Daan Peeters. [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What are the tracks that Dean Peeters bought? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: How much is the track Fast As a Shark? [/INST]

Output: SELECT unit_price FROM tracks WHERE name = "Fast As a Shark";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What is the unit price of the tune "Fast As a Shark"? [/INST]

Output: SELECT unit_price FROM tracks WHERE name = "Fast As a Shark";


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: Find the name of tracks which are in Movies playlist but not in music playlist. [/INST]

Output: 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';


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What are the names of all tracks that are on the Movies playlist but not in the music playlist? [/INST]

Output: 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';


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: Find the name of tracks which are in both Movies and music playlists. [/INST]

Output: 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';


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: What are the names of all the tracks that are in both the Movies and music playlists? [/INST]

Output: 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';


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: Find number of tracks in each genre? [/INST]

Output: SELECT count(*) ,  T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;


Input:
[INST] Here is a database schema:
artists :
id [ INT ] primary_key
name [ TEXT ]

sqlite_sequence :
name [ TEXT ]
seq [ TEXT ]

albums :
id [ INT ] primary_key
title [ TEXT ]
artist_id [ INT ] albums.artist_id = artists.id

employees :
id [ INT ] primary_key
last_name [ TEXT ]
first_name [ TEXT ]
title [ TEXT ]
reports_to [ INT ] employees.reports_to = employees.id
birth_date [ TEXT ]
hire_date [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]

customers :
id [ INT ] primary_key
first_name [ TEXT ]
last_name [ TEXT ]
company [ TEXT ]
address [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]
postal_code [ TEXT ]
phone [ TEXT ]
fax [ TEXT ]
email [ TEXT ]
support_rep_id [ INT ] customers.support_rep_id = employees.id

genres :
id [ INT ] primary_key
name [ TEXT ]

invoices :
id [ INT ] primary_key
customer_id [ INT ] invoices.customer_id = customers.id
invoice_date [ TEXT ]
billing_address [ TEXT ]
billing_city [ TEXT ]
billing_state [ TEXT ]
billing_country [ TEXT ]
billing_postal_code [ TEXT ]
total [ INT ]

media_types :
id [ INT ] primary_key
name [ TEXT ]

tracks :
id [ INT ] primary_key
name [ TEXT ]
album_id [ INT ] tracks.album_id = albums.id
media_type_id [ INT ] tracks.media_type_id = media_types.id
genre_id [ INT ] tracks.genre_id = genres.id
composer [ TEXT ]
milliseconds [ INT ]
bytes [ INT ]
unit_price [ INT ]

invoice_lines :
id [ INT ] primary_key
invoice_id [ INT ] invoice_lines.invoice_id = invoices.id
track_id [ INT ] invoice_lines.track_id = tracks.id
unit_price [ INT ]
quantity [ INT ]

playlists :
id [ INT ] primary_key
name [ TEXT ]

playlist_tracks :
playlist_id [ INT ] primary_key playlist_tracks.playlist_id = playlists.id
track_id [ INT ] playlist_tracks.track_id = tracks.id

Please write me a SQL statement that answers the following question: How many tracks are in each genre? [/INST]

Output: SELECT count(*) ,  T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;


Input:
[INST] Here is a database schema:
journal :
Journal_ID [ INT ] primary_key
Date [ TEXT ]
Theme [ TEXT ]
Sales [ INT ]

editor :
Editor_ID [ INT ] primary_key
Name [ TEXT ]
Age [ INT ]

journal_committee :
Editor_ID [ INT ] primary_key journal_committee.Editor_ID = editor.Editor_ID
Journal_ID [ INT ] journal_committee.Journal_ID = journal.Journal_ID
Work_Type [ TEXT ]

Please write me a SQL statement that answers the following question: How many editors are there? [/INST]

Output: SELECT count(*) FROM editor;


Input:
[INST] Here is a database schema:
journal :
Journal_ID [ INT ] primary_key
Date [ TEXT ]
Theme [ TEXT ]
Sales [ INT ]

editor :
Editor_ID [ INT ] primary_key
Name [ TEXT ]
Age [ INT ]

journal_committee :
Editor_ID [ INT ] primary_key journal_committee.Editor_ID = editor.Editor_ID
Journal_ID [ INT ] journal_committee.Journal_ID = journal.Journal_ID
Work_Type [ TEXT ]

Please write me a SQL statement that answers the following question: List the names of editors in ascending order of age. [/INST]

Output: SELECT Name FROM editor ORDER BY Age ASC;


Input:
[INST] Here is a database schema:
journal :
Journal_ID [ INT ] primary_key
Date [ TEXT ]
Theme [ TEXT ]
Sales [ INT ]

editor :
Editor_ID [ INT ] primary_key
Name [ TEXT ]
Age [ INT ]

journal_committee :
Editor_ID [ INT ] primary_key journal_committee.Editor_ID = editor.Editor_ID
Journal_ID [ INT ] journal_committee.Journal_ID = journal.Journal_ID
Work_Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names and ages of editors? [/INST]

Output: SELECT Name ,  Age FROM editor;


Input:
[INST] Here is a database schema:
journal :
Journal_ID [ INT ] primary_key
Date [ TEXT ]
Theme [ TEXT ]
Sales [ INT ]

editor :
Editor_ID [ INT ] primary_key
Name [ TEXT ]
Age [ INT ]

journal_committee :
Editor_ID [ INT ] primary_key journal_committee.Editor_ID = editor.Editor_ID
Journal_ID [ INT ] journal_committee.Journal_ID = journal.Journal_ID
Work_Type [ TEXT ]

Please write me a SQL statement that answers the following question: List the names of editors who are older than 25. [/INST]

Output: SELECT Name FROM editor WHERE Age  >  25;


Input:
[INST] Here is a database schema:
journal :
Journal_ID [ INT ] primary_key
Date [ TEXT ]
Theme [ TEXT ]
Sales [ INT ]

editor :
Editor_ID [ INT ] primary_key
Name [ TEXT ]
Age [ INT ]

journal_committee :
Editor_ID [ INT ] primary_key journal_committee.Editor_ID = editor.Editor_ID
Journal_ID [ INT ] journal_committee.Journal_ID = journal.Journal_ID
Work_Type [ TEXT ]

Please write me a SQL statement that answers the following question: Show the names of editors of age either 24 or 25. [/INST]

Output: SELECT Name FROM editor WHERE Age  =  24 OR Age  =  25;


Input:
[INST] Here is a database schema:
journal :
Journal_ID [ INT ] primary_key
Date [ TEXT ]
Theme [ TEXT ]
Sales [ INT ]

editor :
Editor_ID [ INT ] primary_key
Name [ TEXT ]
Age [ INT ]

journal_committee :
Editor_ID [ INT ] primary_key journal_committee.Editor_ID = editor.Editor_ID
Journal_ID [ INT ] journal_committee.Journal_ID = journal.Journal_ID
Work_Type [ TEXT ]

Please write me a SQL statement that answers the following question: What is the name of the youngest editor? [/INST]

Output: SELECT Name FROM editor ORDER BY Age ASC LIMIT 1;


Input:
[INST] Here is a database schema:
journal :
Journal_ID [ INT ] primary_key
Date [ TEXT ]
Theme [ TEXT ]
Sales [ INT ]

editor :
Editor_ID [ INT ] primary_key
Name [ TEXT ]
Age [ INT ]

journal_committee :
Editor_ID [ INT ] primary_key journal_committee.Editor_ID = editor.Editor_ID
Journal_ID [ INT ] journal_committee.Journal_ID = journal.Journal_ID
Work_Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are the different ages of editors? Show each age along with the number of editors of that age. [/INST]

Output: SELECT Age ,  COUNT(*) FROM editor GROUP BY Age;


Input:
[INST] Here is a database schema:
journal :
Journal_ID [ INT ] primary_key
Date [ TEXT ]
Theme [ TEXT ]
Sales [ INT ]

editor :
Editor_ID [ INT ] primary_key
Name [ TEXT ]
Age [ INT ]

journal_committee :
Editor_ID [ INT ] primary_key journal_committee.Editor_ID = editor.Editor_ID
Journal_ID [ INT ] journal_committee.Journal_ID = journal.Journal_ID
Work_Type [ TEXT ]

Please write me a SQL statement that answers the following question: Please show the most common age of editors. [/INST]

Output: SELECT Age FROM editor GROUP BY Age ORDER BY COUNT(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
journal :
Journal_ID [ INT ] primary_key
Date [ TEXT ]
Theme [ TEXT ]
Sales [ INT ]

editor :
Editor_ID [ INT ] primary_key
Name [ TEXT ]
Age [ INT ]

journal_committee :
Editor_ID [ INT ] primary_key journal_committee.Editor_ID = editor.Editor_ID
Journal_ID [ INT ] journal_committee.Journal_ID = journal.Journal_ID
Work_Type [ TEXT ]

Please write me a SQL statement that answers the following question: Show the distinct themes of journals. [/INST]

Output: SELECT DISTINCT Theme FROM journal;


Input:
[INST] Here is a database schema:
journal :
Journal_ID [ INT ] primary_key
Date [ TEXT ]
Theme [ TEXT ]
Sales [ INT ]

editor :
Editor_ID [ INT ] primary_key
Name [ TEXT ]
Age [ INT ]

journal_committee :
Editor_ID [ INT ] primary_key journal_committee.Editor_ID = editor.Editor_ID
Journal_ID [ INT ] journal_committee.Journal_ID = journal.Journal_ID
Work_Type [ TEXT ]

Please write me a SQL statement that answers the following question: Show the names of editors and the theme of journals for which they serve on committees. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
journal :
Journal_ID [ INT ] primary_key
Date [ TEXT ]
Theme [ TEXT ]
Sales [ INT ]

editor :
Editor_ID [ INT ] primary_key
Name [ TEXT ]
Age [ INT ]

journal_committee :
Editor_ID [ INT ] primary_key journal_committee.Editor_ID = editor.Editor_ID
Journal_ID [ INT ] journal_committee.Journal_ID = journal.Journal_ID
Work_Type [ TEXT ]

Please write me a SQL statement that answers the following question: For each journal_committee, find the editor name and the journal theme. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
journal :
Journal_ID [ INT ] primary_key
Date [ TEXT ]
Theme [ TEXT ]
Sales [ INT ]

editor :
Editor_ID [ INT ] primary_key
Name [ TEXT ]
Age [ INT ]

journal_committee :
Editor_ID [ INT ] primary_key journal_committee.Editor_ID = editor.Editor_ID
Journal_ID [ INT ] journal_committee.Journal_ID = journal.Journal_ID
Work_Type [ TEXT ]

Please write me a SQL statement that answers the following 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. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
journal :
Journal_ID [ INT ] primary_key
Date [ TEXT ]
Theme [ TEXT ]
Sales [ INT ]

editor :
Editor_ID [ INT ] primary_key
Name [ TEXT ]
Age [ INT ]

journal_committee :
Editor_ID [ INT ] primary_key journal_committee.Editor_ID = editor.Editor_ID
Journal_ID [ INT ] journal_committee.Journal_ID = journal.Journal_ID
Work_Type [ TEXT ]

Please write me a SQL statement that answers the following question: Show the names of editors that are on the committee of journals with sales bigger than 3000. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
journal :
Journal_ID [ INT ] primary_key
Date [ TEXT ]
Theme [ TEXT ]
Sales [ INT ]

editor :
Editor_ID [ INT ] primary_key
Name [ TEXT ]
Age [ INT ]

journal_committee :
Editor_ID [ INT ] primary_key journal_committee.Editor_ID = editor.Editor_ID
Journal_ID [ INT ] journal_committee.Journal_ID = journal.Journal_ID
Work_Type [ TEXT ]

Please write me a SQL statement that answers the following question: Show the id, name of each editor and the number of journal committees they are on. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
journal :
Journal_ID [ INT ] primary_key
Date [ TEXT ]
Theme [ TEXT ]
Sales [ INT ]

editor :
Editor_ID [ INT ] primary_key
Name [ TEXT ]
Age [ INT ]

journal_committee :
Editor_ID [ INT ] primary_key journal_committee.Editor_ID = editor.Editor_ID
Journal_ID [ INT ] journal_committee.Journal_ID = journal.Journal_ID
Work_Type [ TEXT ]

Please write me a SQL statement that answers the following question: Show the names of editors that are on at least two journal committees. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
journal :
Journal_ID [ INT ] primary_key
Date [ TEXT ]
Theme [ TEXT ]
Sales [ INT ]

editor :
Editor_ID [ INT ] primary_key
Name [ TEXT ]
Age [ INT ]

journal_committee :
Editor_ID [ INT ] primary_key journal_committee.Editor_ID = editor.Editor_ID
Journal_ID [ INT ] journal_committee.Journal_ID = journal.Journal_ID
Work_Type [ TEXT ]

Please write me a SQL statement that answers the following question: List the names of editors that are not on any journal committee. [/INST]

Output: SELECT Name FROM editor WHERE editor_id NOT IN (SELECT editor_id FROM journal_committee);


Input:
[INST] Here is a database schema:
journal :
Journal_ID [ INT ] primary_key
Date [ TEXT ]
Theme [ TEXT ]
Sales [ INT ]

editor :
Editor_ID [ INT ] primary_key
Name [ TEXT ]
Age [ INT ]

journal_committee :
Editor_ID [ INT ] primary_key journal_committee.Editor_ID = editor.Editor_ID
Journal_ID [ INT ] journal_committee.Journal_ID = journal.Journal_ID
Work_Type [ TEXT ]

Please write me a SQL statement that answers the following question: List the date, theme and sales of the journal which did not have any of the listed editors serving on committee. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
journal :
Journal_ID [ INT ] primary_key
Date [ TEXT ]
Theme [ TEXT ]
Sales [ INT ]

editor :
Editor_ID [ INT ] primary_key
Name [ TEXT ]
Age [ INT ]

journal_committee :
Editor_ID [ INT ] primary_key journal_committee.Editor_ID = editor.Editor_ID
Journal_ID [ INT ] journal_committee.Journal_ID = journal.Journal_ID
Work_Type [ TEXT ]

Please write me a SQL statement that answers the following question: What is the average sales of the journals that have an editor whose work type is 'Photo'? [/INST]

Output: 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';


Input:
[INST] Here is a database schema:
Accounts :
account_id [ INT ] primary_key
customer_id [ INT ]
account_name [ TEXT ]
other_account_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_first_name [ TEXT ]
customer_last_name [ TEXT ]
customer_address [ TEXT ]
customer_phone [ TEXT ]
customer_email [ TEXT ]
other_customer_details [ TEXT ]

Customers_Cards :
card_id [ INT ] primary_key
customer_id [ INT ]
card_type_code [ TEXT ]
card_number [ TEXT ]
date_valid_from [ TEXT ]
date_valid_to [ TEXT ]
other_card_details [ TEXT ]

Financial_Transactions :
transaction_id [ INT ]
previous_transaction_id [ INT ]
account_id [ INT ] Financial_Transactions.account_id = Accounts.account_id
card_id [ INT ] Financial_Transactions.card_id = Customers_Cards.card_id
transaction_type [ TEXT ]
transaction_date [ TEXT ]
transaction_amount [ INT ]
transaction_comment [ TEXT ]
other_transaction_details [ TEXT ]

Please write me a SQL statement that answers the following question: How many accounts do we have? [/INST]

Output: SELECT count(*) FROM Accounts;


Input:
[INST] Here is a database schema:
Accounts :
account_id [ INT ] primary_key
customer_id [ INT ]
account_name [ TEXT ]
other_account_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_first_name [ TEXT ]
customer_last_name [ TEXT ]
customer_address [ TEXT ]
customer_phone [ TEXT ]
customer_email [ TEXT ]
other_customer_details [ TEXT ]

Customers_Cards :
card_id [ INT ] primary_key
customer_id [ INT ]
card_type_code [ TEXT ]
card_number [ TEXT ]
date_valid_from [ TEXT ]
date_valid_to [ TEXT ]
other_card_details [ TEXT ]

Financial_Transactions :
transaction_id [ INT ]
previous_transaction_id [ INT ]
account_id [ INT ] Financial_Transactions.account_id = Accounts.account_id
card_id [ INT ] Financial_Transactions.card_id = Customers_Cards.card_id
transaction_type [ TEXT ]
transaction_date [ TEXT ]
transaction_amount [ INT ]
transaction_comment [ TEXT ]
other_transaction_details [ TEXT ]

Please write me a SQL statement that answers the following question: Count the number of accounts. [/INST]

Output: SELECT count(*) FROM Accounts;


Input:
[INST] Here is a database schema:
Accounts :
account_id [ INT ] primary_key
customer_id [ INT ]
account_name [ TEXT ]
other_account_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_first_name [ TEXT ]
customer_last_name [ TEXT ]
customer_address [ TEXT ]
customer_phone [ TEXT ]
customer_email [ TEXT ]
other_customer_details [ TEXT ]

Customers_Cards :
card_id [ INT ] primary_key
customer_id [ INT ]
card_type_code [ TEXT ]
card_number [ TEXT ]
date_valid_from [ TEXT ]
date_valid_to [ TEXT ]
other_card_details [ TEXT ]

Financial_Transactions :
transaction_id [ INT ]
previous_transaction_id [ INT ]
account_id [ INT ] Financial_Transactions.account_id = Accounts.account_id
card_id [ INT ] Financial_Transactions.card_id = Customers_Cards.card_id
transaction_type [ TEXT ]
transaction_date [ TEXT ]
transaction_amount [ INT ]
transaction_comment [ TEXT ]
other_transaction_details [ TEXT ]

Please write me a SQL statement that answers the following question: Show ids, customer ids, names for all accounts. [/INST]

Output: SELECT account_id ,  customer_id ,  account_name FROM Accounts;


Input:
[INST] Here is a database schema:
Accounts :
account_id [ INT ] primary_key
customer_id [ INT ]
account_name [ TEXT ]
other_account_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_first_name [ TEXT ]
customer_last_name [ TEXT ]
customer_address [ TEXT ]
customer_phone [ TEXT ]
customer_email [ TEXT ]
other_customer_details [ TEXT ]

Customers_Cards :
card_id [ INT ] primary_key
customer_id [ INT ]
card_type_code [ TEXT ]
card_number [ TEXT ]
date_valid_from [ TEXT ]
date_valid_to [ TEXT ]
other_card_details [ TEXT ]

Financial_Transactions :
transaction_id [ INT ]
previous_transaction_id [ INT ]
account_id [ INT ] Financial_Transactions.account_id = Accounts.account_id
card_id [ INT ] Financial_Transactions.card_id = Customers_Cards.card_id
transaction_type [ TEXT ]
transaction_date [ TEXT ]
transaction_amount [ INT ]
transaction_comment [ TEXT ]
other_transaction_details [ TEXT ]

Please write me a SQL statement that answers the following question: What are the account ids, customer ids, and account names for all the accounts? [/INST]

Output: SELECT account_id ,  customer_id ,  account_name FROM Accounts;


Input:
[INST] Here is a database schema:
Accounts :
account_id [ INT ] primary_key
customer_id [ INT ]
account_name [ TEXT ]
other_account_details [ TEXT ]

Customers :
customer_id [ INT ] primary_key
customer_first_name [ TEXT ]
customer_last_name [ TEXT ]
customer_address [ TEXT ]
customer_phone [ TEXT ]
customer_email [ TEXT ]
other_customer_details [ TEXT ]

Customers_Cards :
card_id [ INT ] primary_key
customer_id [ INT ]
card_type_code [ TEXT ]
card_number [ TEXT ]
date_valid_from [ TEXT ]
date_valid_to [ TEXT ]
other_card_details [ TEXT ]

Financial_Transactions :
transaction_id [ INT ]
previous_transaction_id [ INT ]
account_id [ INT ] Financial_Transactions.account_id = Accounts.account_id
card_id [ INT ] Financial_Transactions.card_id = Customers_Cards.card_id
transaction_type [ TEXT ]
transaction_date [ TEXT ]
transaction_amount [ INT ]
transaction_comment [ TEXT ]
other_transaction_details [ TEXT ]

Please write me a SQL statement that answers the following question: Show other account details for account with name 338. [/INST]

Output: SELECT other_account_details FROM Accounts WHERE account_name  =  "338";