QIAN-ME/bird_schema_data huggingface dataset:
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    What is the release title of the single under the "funk" tag that was released the oldest? release title of single refers to groupName where releaseType = 'single'; the oldest means coming before all others in time and refers to MIN(groupYear);

    【Evidence】
    release title of single refers to groupName where releaseType = 'single'; the oldest means coming before all others in time and refers to MIN(groupYear);

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag LIKE 'funk' AND T1.releaseType = 'single' ORDER BY T1.groupYear LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    Name all the release titles of the "ep's" under the alternative tag. release titles of the "ep's" refer to groupName where releaseType = 'ep';

    【Evidence】
    release titles of the "ep's" refer to groupName where releaseType = 'ep';

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag LIKE 'alternative' AND T1.releaseType = 'ep'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    What are the tags of the top 5 least downloaded live albums? least downloaded album refers to MIN(totalSnatched where releaseType = 'album');

    【Evidence】
    least downloaded album refers to MIN(totalSnatched where releaseType = 'album');

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'album' ORDER BY T1.totalSnatched LIMIT 5
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    What is the tag and the artist of the most downloaded single? the most downloaded single refers to MAX(totalSnatched where releaseType = 'single');

    【Evidence】
    the most downloaded single refers to MAX(totalSnatched where releaseType = 'single');

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T2.tag, T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'single' ORDER BY T1.totalSnatched DESC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    How many releases are tagged "1980s"? tag = '1980s';

    【Evidence】
    tag = '1980s';

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(id) FROM tags WHERE tag LIKE '1980s'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    How many times has the release "city funk" been downloaded? groupName = 'city funk'; downloaded refers to totalSnatched;

    【Evidence】
    groupName = 'city funk'; downloaded refers to totalSnatched;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT totalSnatched FROM torrents WHERE groupName LIKE 'city funk'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    Please list the releases that have been downloaded for more than 20000 times. releases refer to groupName; downloaded for more than 20000 times refers to totalSnatched > 20000;

    【Evidence】
    releases refer to groupName; downloaded for more than 20000 times refers to totalSnatched > 20000;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT groupName FROM torrents WHERE totalSnatched > 20000
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    What are the tags of the release "sugarhill gang"? release "sugarhill gang" refers to groupName = 'sugarhill gang';

    【Evidence】
    release "sugarhill gang" refers to groupName = 'sugarhill gang';

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupName = 'sugarhill gang'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    How many tags does the release "city funk" have？ release "city funk" refers to groupName = 'city funk';

    【Evidence】
    release "city funk" refers to groupName = 'city funk';

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupName = 'city funk'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    Please list the titles of all the releases with the tag "1980s". titles refer to groupName;

    【Evidence】
    titles refer to groupName;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    Among the releases with the tag "1980s", which one of them is the most downloaded? Please give its title. title refers to groupName; the most downloaded refers to MAX(totalSnatched);

    【Evidence】
    title refers to groupName; the most downloaded refers to MAX(totalSnatched);

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s' ORDER BY T1.totalSnatched DESC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    How many releases by the artist michael jackson are tagged "pop"? tag = 'pop';

    【Evidence】
    tag = 'pop';

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(T1.groupName) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'pop' AND T1.artist = 'michael jackson'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    Among the releases that were released in 2000, how many of them were released as an album and tagged "pop"? groupYear = 2000; album refers to releaseType;

    【Evidence】
    groupYear = 2000; album refers to releaseType;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(T1.groupName) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'pop' AND T1.releaseType = 'album' AND T1.groupYear = 2000
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    What are the average download times for the a release tagged "1980s"? AVG(totalSnatched where tag = '1980s');

    【Evidence】
    AVG(totalSnatched where tag = '1980s');

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT CAST(SUM(T1.totalSnatched) AS REAL) / COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    Name the title of the top three releases with the highest number of downloads. title refers to groupName; the highest number of downloads refers to MAX(totalSnatched);

    【Evidence】
    title refers to groupName; the highest number of downloads refers to MAX(totalSnatched);

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT groupName FROM torrents ORDER BY totalSnatched DESC LIMIT 3
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    Provide the name of the artist who released his or her Single-Table in 2012 with the highest number of downloads. Name the Single-Table title as well. title refers to groupName; the highest number of downloads refers to MAX(totalSnatched where groupYear = 2012 and releaseType = 'single');

    【Evidence】
    title refers to groupName; the highest number of downloads refers to MAX(totalSnatched where groupYear = 2012 and releaseType = 'single');

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT artist, groupName FROM torrents WHERE groupYear = 2012 AND releaseType LIKE 'Single' ORDER BY totalSnatched DESC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    How many albums and Single-Tables were released by the artist named '50 cent' between 2010 and 2015? albums refer to releaseType = 'album'; releaseType = 'single'; between 2010 and 2015 refers to groupYear between 2010 and 2015;

    【Evidence】
    albums refer to releaseType = 'album'; releaseType = 'single'; between 2010 and 2015 refers to groupYear between 2010 and 2015;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(id), ( SELECT COUNT(id) FROM torrents WHERE groupYear BETWEEN 2010 AND 2015 AND artist LIKE '50 cent' AND releaseType LIKE 'album' ) FROM torrents WHERE groupYear BETWEEN 2010 AND 2015 AND artist LIKE '50 cent' AND releaseType LIKE 'Single'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    An American rapper '2Pac' released his first solo album in 1991, how many years have passed until his next album was released? 2Pac is an artist; album refers to releaseType; groupYear = 1991; SUBTRACT(groupYear = 1991, groupYear where releaseType = 'album' LIMIT 1 OFFSET 1);

    【Evidence】
    2Pac is an artist; album refers to releaseType; groupYear = 1991; SUBTRACT(groupYear = 1991, groupYear where releaseType = 'album' LIMIT 1 OFFSET 1);

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT ( SELECT groupYear FROM torrents WHERE artist LIKE '2Pac' AND releaseType LIKE 'album' ORDER BY groupYear LIMIT 1, 1 ) - groupYear FROM torrents WHERE artist LIKE '2Pac' AND releaseType LIKE 'album' AND groupYear = 1991
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 music_tracker
【Schema】
# Table: tags
[
(index:INTEGER, Primary Key, Examples: [0, 1, 2]),
(id:INTEGER, Examples: [0, 2, 3]),
(tag:TEXT, Examples: [1970s, funk, disco])
]
# Table: torrents
[
(groupName:TEXT, Examples: [superappin&#39;]),
(totalSnatched:INTEGER, Examples: [239, 156, 480]),
(artist:TEXT, Examples: [grandmaster flash & the furious five]),
(groupYear:INTEGER, Examples: [1979, 1980, 1981]),
(releaseType:TEXT, Examples: [single, album, live album]),
(groupId:INTEGER, Examples: [720949, 728752, 18513]),
(id:INTEGER, Primary Key, Examples: [0, 1, 2])
]
【Foreign keys】
tags.id=torrents.id

    【Question】
    Find the average number of downloads for Single-Tables released by '2Pac' between 2001 and 2013. 2Pac is an artist; releaseType = 'single'; between 2001 and 2013 refers to groupYear between 2001 and 2013; average number of downloads = AVG(totalSnatched);

    【Evidence】
    2Pac is an artist; releaseType = 'single'; between 2001 and 2013 refers to groupYear between 2001 and 2013; average number of downloads = AVG(totalSnatched);

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT AVG(totalSnatched) FROM torrents WHERE artist LIKE '2Pac' AND releaseType LIKE 'Single' AND groupYear BETWEEN 2001 AND 2013