lianghsun/bird-text2sql-bench huggingface dataset:
### Database Schema
CREATE TABLE state
(
    StateCode TEXT
        constraint state_pk
            primary key,
    State     TEXT,
    Region    TEXT
)

CREATE TABLE callcenterlogs
(
    "Date received" DATE,
    "Complaint ID"  TEXT,
    "rand client"   TEXT,
    phonefinal      TEXT,
    "vru+line"      TEXT,
    call_id         INTEGER,
    priority        INTEGER,
    type            TEXT,
    outcome         TEXT,
    server          TEXT,
    ser_start       TEXT,
    ser_exit        TEXT,
    ser_time        TEXT,
    primary key ("Complaint ID"),
    foreign key ("rand client") references client(client_id)
)

CREATE TABLE client
(
    client_id   TEXT
            primary key,
    sex         TEXT,
    day         INTEGER,
    month       INTEGER,
    year        INTEGER,
    age         INTEGER,
    social      TEXT,
    first       TEXT,
    middle      TEXT,
    last        TEXT,
    phone       TEXT,
    email       TEXT,
    address_1   TEXT,
    address_2   TEXT,
    city        TEXT,
    state       TEXT,
    zipcode     INTEGER,
    district_id INTEGER,
    foreign key (district_id) references district(district_id)
)

CREATE TABLE district
(
    district_id  INTEGER
            primary key,
    city         TEXT,
    state_abbrev TEXT,
    division     TEXT,
    foreign key (state_abbrev) references state(StateCode)
)

CREATE TABLE events
(
    "Date received"                DATE,
    Product                        TEXT,
    "Sub-product"                  TEXT,
    Issue                          TEXT,
    "Sub-issue"                    TEXT,
    "Consumer complaint narrative" TEXT,
    Tags                           TEXT,
    "Consumer consent provided?"   TEXT,
    "Submitted via"                TEXT,
    "Date sent to company"         TEXT,
    "Company response to consumer" TEXT,
    "Timely response?"             TEXT,
    "Consumer disputed?"           TEXT,
    "Complaint ID"                 TEXT,
    Client_ID                      TEXT,
    primary key ("Complaint ID", Client_ID),
    foreign key ("Complaint ID") references callcenterlogs("Complaint ID"),
    foreign key (Client_ID) references client(client_id)
)

CREATE TABLE reviews
(
    "Date"        DATE
            primary key,
    Stars       INTEGER,
    Reviews     TEXT,
    Product     TEXT,
    district_id INTEGER,
    foreign key (district_id) references district(district_id)
)

### Question
List the product and its issues of the complains of clients with age greater than the 60% of average age of all clients.

### Hint
age greater than the 60% of average age refers to age > multiply(avg(age) , 0.6)

### SQL
SELECT DISTINCT T2.Product, T2.Issue FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.age * 100 > ( SELECT AVG(age) * 60 FROM client )
### Database Schema
CREATE TABLE state
(
    StateCode TEXT
        constraint state_pk
            primary key,
    State     TEXT,
    Region    TEXT
)

CREATE TABLE callcenterlogs
(
    "Date received" DATE,
    "Complaint ID"  TEXT,
    "rand client"   TEXT,
    phonefinal      TEXT,
    "vru+line"      TEXT,
    call_id         INTEGER,
    priority        INTEGER,
    type            TEXT,
    outcome         TEXT,
    server          TEXT,
    ser_start       TEXT,
    ser_exit        TEXT,
    ser_time        TEXT,
    primary key ("Complaint ID"),
    foreign key ("rand client") references client(client_id)
)

CREATE TABLE client
(
    client_id   TEXT
            primary key,
    sex         TEXT,
    day         INTEGER,
    month       INTEGER,
    year        INTEGER,
    age         INTEGER,
    social      TEXT,
    first       TEXT,
    middle      TEXT,
    last        TEXT,
    phone       TEXT,
    email       TEXT,
    address_1   TEXT,
    address_2   TEXT,
    city        TEXT,
    state       TEXT,
    zipcode     INTEGER,
    district_id INTEGER,
    foreign key (district_id) references district(district_id)
)

CREATE TABLE district
(
    district_id  INTEGER
            primary key,
    city         TEXT,
    state_abbrev TEXT,
    division     TEXT,
    foreign key (state_abbrev) references state(StateCode)
)

CREATE TABLE events
(
    "Date received"                DATE,
    Product                        TEXT,
    "Sub-product"                  TEXT,
    Issue                          TEXT,
    "Sub-issue"                    TEXT,
    "Consumer complaint narrative" TEXT,
    Tags                           TEXT,
    "Consumer consent provided?"   TEXT,
    "Submitted via"                TEXT,
    "Date sent to company"         TEXT,
    "Company response to consumer" TEXT,
    "Timely response?"             TEXT,
    "Consumer disputed?"           TEXT,
    "Complaint ID"                 TEXT,
    Client_ID                      TEXT,
    primary key ("Complaint ID", Client_ID),
    foreign key ("Complaint ID") references callcenterlogs("Complaint ID"),
    foreign key (Client_ID) references client(client_id)
)

CREATE TABLE reviews
(
    "Date"        DATE
            primary key,
    Stars       INTEGER,
    Reviews     TEXT,
    Product     TEXT,
    district_id INTEGER,
    foreign key (district_id) references district(district_id)
)

### Question
In reviews of product with 5 stars, what is the percentage of the reviews coming from the division of East North Central?

### Hint
5 stars refers to Stars = 5; percentage = divide(count(division = 'East North Central', count(division)) * 100%

### SQL
SELECT CAST(SUM(CASE WHEN T1.division = 'East North Central' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.division) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T2.Stars = 5
### Database Schema
CREATE TABLE sqlite_sequence(name,seq)

CREATE TABLE "Method"
(
    Id            INTEGER not null
        primary key autoincrement,
    Name          TEXT,
    FullComment   TEXT,
    Summary       TEXT,
    ApiCalls      TEXT,
    CommentIsXml  INTEGER,
    SampledAt     INTEGER,
    SolutionId    INTEGER,
    Lang          TEXT,
    NameTokenized TEXT
)

CREATE TABLE "MethodParameter"
(
    Id       INTEGER not null
        primary key autoincrement,
    MethodId TEXT,
    Type     TEXT,
    Name     TEXT
)

CREATE TABLE Repo
(
    Id            INTEGER not null
        primary key autoincrement,
    Url           TEXT,
    Stars         INTEGER,
    Forks         INTEGER,
    Watchers      INTEGER,
    ProcessedTime INTEGER
)

CREATE TABLE Solution
(
    Id            INTEGER not null
        primary key autoincrement,
    RepoId        INTEGER,
    Path          TEXT,
    ProcessedTime INTEGER,
    WasCompiled   INTEGER
)

### Question
How many English language codes whose comments for the method are in the XML format?

### Hint
English language refers to Lang = 'en'; the comments for this method is XML format refers to CommentIsXml = 1;

### SQL
SELECT COUNT(Lang) FROM Method WHERE Lang = 'en' AND CommentIsXml = 1
### Database Schema
CREATE TABLE sqlite_sequence(name,seq)

CREATE TABLE "Method"
(
    Id            INTEGER not null
        primary key autoincrement,
    Name          TEXT,
    FullComment   TEXT,
    Summary       TEXT,
    ApiCalls      TEXT,
    CommentIsXml  INTEGER,
    SampledAt     INTEGER,
    SolutionId    INTEGER,
    Lang          TEXT,
    NameTokenized TEXT
)

CREATE TABLE "MethodParameter"
(
    Id       INTEGER not null
        primary key autoincrement,
    MethodId TEXT,
    Type     TEXT,
    Name     TEXT
)

CREATE TABLE Repo
(
    Id            INTEGER not null
        primary key autoincrement,
    Url           TEXT,
    Stars         INTEGER,
    Forks         INTEGER,
    Watchers      INTEGER,
    ProcessedTime INTEGER
)

CREATE TABLE Solution
(
    Id            INTEGER not null
        primary key autoincrement,
    RepoId        INTEGER,
    Path          TEXT,
    ProcessedTime INTEGER,
    WasCompiled   INTEGER
)

### Question
What is the task of the method whose tokenized name is "online median filter test median window filling"?

### Hint
tokenized name refers to NameTokenized; task of the method refers to the second part of name deliminated by "."; for example, the task of 'LinqToDelicious.HttpWebRequestFactory.Create' is 'HttpWebRequestFactory'

### SQL
SELECT SUBSTR(SUBSTR(Name, INSTR(Name, '.') + 1), 1, INSTR(SUBSTR(Name, INSTR(Name, '.') + 1), '.') - 1) task FROM Method WHERE NameTokenized = 'online median filter test median window filling'
### Database Schema
CREATE TABLE sqlite_sequence(name,seq)

CREATE TABLE "Method"
(
    Id            INTEGER not null
        primary key autoincrement,
    Name          TEXT,
    FullComment   TEXT,
    Summary       TEXT,
    ApiCalls      TEXT,
    CommentIsXml  INTEGER,
    SampledAt     INTEGER,
    SolutionId    INTEGER,
    Lang          TEXT,
    NameTokenized TEXT
)

CREATE TABLE "MethodParameter"
(
    Id       INTEGER not null
        primary key autoincrement,
    MethodId TEXT,
    Type     TEXT,
    Name     TEXT
)

CREATE TABLE Repo
(
    Id            INTEGER not null
        primary key autoincrement,
    Url           TEXT,
    Stars         INTEGER,
    Forks         INTEGER,
    Watchers      INTEGER,
    ProcessedTime INTEGER
)

CREATE TABLE Solution
(
    Id            INTEGER not null
        primary key autoincrement,
    RepoId        INTEGER,
    Path          TEXT,
    ProcessedTime INTEGER,
    WasCompiled   INTEGER
)

### Question
What is the time of sampling of the solution with the highest sampling time? Indicate the id number of the solution.

### Hint
highest sampling time refers to max(SampledAt); id number of the solution refers to SolutionId;

### SQL
SELECT DISTINCT SampledAt, SolutionId FROM Method WHERE SampledAt = ( SELECT MAX(SampledAt) FROM Method )
### Database Schema
CREATE TABLE sqlite_sequence(name,seq)

CREATE TABLE "Method"
(
    Id            INTEGER not null
        primary key autoincrement,
    Name          TEXT,
    FullComment   TEXT,
    Summary       TEXT,
    ApiCalls      TEXT,
    CommentIsXml  INTEGER,
    SampledAt     INTEGER,
    SolutionId    INTEGER,
    Lang          TEXT,
    NameTokenized TEXT
)

CREATE TABLE "MethodParameter"
(
    Id       INTEGER not null
        primary key autoincrement,
    MethodId TEXT,
    Type     TEXT,
    Name     TEXT
)

CREATE TABLE Repo
(
    Id            INTEGER not null
        primary key autoincrement,
    Url           TEXT,
    Stars         INTEGER,
    Forks         INTEGER,
    Watchers      INTEGER,
    ProcessedTime INTEGER
)

CREATE TABLE Solution
(
    Id            INTEGER not null
        primary key autoincrement,
    RepoId        INTEGER,
    Path          TEXT,
    ProcessedTime INTEGER,
    WasCompiled   INTEGER
)

### Question
How many followers do the most followed repository on Github have? Give the github address of the repository.

### Hint
more forks refers to more people follow this repository; most followed repository refers to max(Forks);  the github address of the repository refers to Url;

### SQL
SELECT Forks, Url FROM Repo WHERE Forks = ( SELECT MAX(Forks) FROM Repo )
### Database Schema
CREATE TABLE sqlite_sequence(name,seq)

CREATE TABLE "Method"
(
    Id            INTEGER not null
        primary key autoincrement,
    Name          TEXT,
    FullComment   TEXT,
    Summary       TEXT,
    ApiCalls      TEXT,
    CommentIsXml  INTEGER,
    SampledAt     INTEGER,
    SolutionId    INTEGER,
    Lang          TEXT,
    NameTokenized TEXT
)

CREATE TABLE "MethodParameter"
(
    Id       INTEGER not null
        primary key autoincrement,
    MethodId TEXT,
    Type     TEXT,
    Name     TEXT
)

CREATE TABLE Repo
(
    Id            INTEGER not null
        primary key autoincrement,
    Url           TEXT,
    Stars         INTEGER,
    Forks         INTEGER,
    Watchers      INTEGER,
    ProcessedTime INTEGER
)

CREATE TABLE Solution
(
    Id            INTEGER not null
        primary key autoincrement,
    RepoId        INTEGER,
    Path          TEXT,
    ProcessedTime INTEGER,
    WasCompiled   INTEGER
)

### Question
What is the id of the repository with the highest number of solution path?

### Hint
highest number of solution path refers to max(count(Path)); id of the repository refers to RepoId

### SQL
SELECT RepoId FROM solution GROUP BY RepoId ORDER BY COUNT(Path) DESC LIMIT 1
### Database Schema
CREATE TABLE sqlite_sequence(name,seq)

CREATE TABLE "Method"
(
    Id            INTEGER not null
        primary key autoincrement,
    Name          TEXT,
    FullComment   TEXT,
    Summary       TEXT,
    ApiCalls      TEXT,
    CommentIsXml  INTEGER,
    SampledAt     INTEGER,
    SolutionId    INTEGER,
    Lang          TEXT,
    NameTokenized TEXT
)

CREATE TABLE "MethodParameter"
(
    Id       INTEGER not null
        primary key autoincrement,
    MethodId TEXT,
    Type     TEXT,
    Name     TEXT
)

CREATE TABLE Repo
(
    Id            INTEGER not null
        primary key autoincrement,
    Url           TEXT,
    Stars         INTEGER,
    Forks         INTEGER,
    Watchers      INTEGER,
    ProcessedTime INTEGER
)

CREATE TABLE Solution
(
    Id            INTEGER not null
        primary key autoincrement,
    RepoId        INTEGER,
    Path          TEXT,
    ProcessedTime INTEGER,
    WasCompiled   INTEGER
)

### Question
What is the most liked repository? Indicate its github address and the amount of stars it has received.

### Hint
more stars mean more people like this repository; most liked refers to max(Stars); the github address of repository refers to Url;

### SQL
SELECT Url, Stars FROM Repo WHERE Stars = ( SELECT MAX(Stars) FROM Repo )
### Database Schema
CREATE TABLE sqlite_sequence(name,seq)

CREATE TABLE "Method"
(
    Id            INTEGER not null
        primary key autoincrement,
    Name          TEXT,
    FullComment   TEXT,
    Summary       TEXT,
    ApiCalls      TEXT,
    CommentIsXml  INTEGER,
    SampledAt     INTEGER,
    SolutionId    INTEGER,
    Lang          TEXT,
    NameTokenized TEXT
)

CREATE TABLE "MethodParameter"
(
    Id       INTEGER not null
        primary key autoincrement,
    MethodId TEXT,
    Type     TEXT,
    Name     TEXT
)

CREATE TABLE Repo
(
    Id            INTEGER not null
        primary key autoincrement,
    Url           TEXT,
    Stars         INTEGER,
    Forks         INTEGER,
    Watchers      INTEGER,
    ProcessedTime INTEGER
)

CREATE TABLE Solution
(
    Id            INTEGER not null
        primary key autoincrement,
    RepoId        INTEGER,
    Path          TEXT,
    ProcessedTime INTEGER,
    WasCompiled   INTEGER
)

### Question
What is the name of the solution path with the highest processed time?

### Hint
highest processed time refers to max(ProcessedTime);

### SQL
SELECT Path FROM Solution WHERE ProcessedTime = ( SELECT MAX(ProcessedTime) FROM Solution )
### Database Schema
CREATE TABLE sqlite_sequence(name,seq)

CREATE TABLE "Method"
(
    Id            INTEGER not null
        primary key autoincrement,
    Name          TEXT,
    FullComment   TEXT,
    Summary       TEXT,
    ApiCalls      TEXT,
    CommentIsXml  INTEGER,
    SampledAt     INTEGER,
    SolutionId    INTEGER,
    Lang          TEXT,
    NameTokenized TEXT
)

CREATE TABLE "MethodParameter"
(
    Id       INTEGER not null
        primary key autoincrement,
    MethodId TEXT,
    Type     TEXT,
    Name     TEXT
)

CREATE TABLE Repo
(
    Id            INTEGER not null
        primary key autoincrement,
    Url           TEXT,
    Stars         INTEGER,
    Forks         INTEGER,
    Watchers      INTEGER,
    ProcessedTime INTEGER
)

CREATE TABLE Solution
(
    Id            INTEGER not null
        primary key autoincrement,
    RepoId        INTEGER,
    Path          TEXT,
    ProcessedTime INTEGER,
    WasCompiled   INTEGER
)

### Question
How much is the processed time of downloading the most popular repository?

### Hint
more watchers mean that this repository is more popular;

### SQL
SELECT ProcessedTime FROM Repo WHERE Watchers = ( SELECT MAX(Watchers) FROM Repo )
### Database Schema
CREATE TABLE sqlite_sequence(name,seq)

CREATE TABLE "Method"
(
    Id            INTEGER not null
        primary key autoincrement,
    Name          TEXT,
    FullComment   TEXT,
    Summary       TEXT,
    ApiCalls      TEXT,
    CommentIsXml  INTEGER,
    SampledAt     INTEGER,
    SolutionId    INTEGER,
    Lang          TEXT,
    NameTokenized TEXT
)

CREATE TABLE "MethodParameter"
(
    Id       INTEGER not null
        primary key autoincrement,
    MethodId TEXT,
    Type     TEXT,
    Name     TEXT
)

CREATE TABLE Repo
(
    Id            INTEGER not null
        primary key autoincrement,
    Url           TEXT,
    Stars         INTEGER,
    Forks         INTEGER,
    Watchers      INTEGER,
    ProcessedTime INTEGER
)

CREATE TABLE Solution
(
    Id            INTEGER not null
        primary key autoincrement,
    RepoId        INTEGER,
    Path          TEXT,
    ProcessedTime INTEGER,
    WasCompiled   INTEGER
)

### Question
What is the github address of the "nofear_Mara\Mara.sln" solution path?

### Hint
github address of repository refers to Url;

### SQL
SELECT Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE Path = 'nofear_MaraMara.sln'
### Database Schema
CREATE TABLE sqlite_sequence(name,seq)

CREATE TABLE "Method"
(
    Id            INTEGER not null
        primary key autoincrement,
    Name          TEXT,
    FullComment   TEXT,
    Summary       TEXT,
    ApiCalls      TEXT,
    CommentIsXml  INTEGER,
    SampledAt     INTEGER,
    SolutionId    INTEGER,
    Lang          TEXT,
    NameTokenized TEXT
)

CREATE TABLE "MethodParameter"
(
    Id       INTEGER not null
        primary key autoincrement,
    MethodId TEXT,
    Type     TEXT,
    Name     TEXT
)

CREATE TABLE Repo
(
    Id            INTEGER not null
        primary key autoincrement,
    Url           TEXT,
    Stars         INTEGER,
    Forks         INTEGER,
    Watchers      INTEGER,
    ProcessedTime INTEGER
)

CREATE TABLE Solution
(
    Id            INTEGER not null
        primary key autoincrement,
    RepoId        INTEGER,
    Path          TEXT,
    ProcessedTime INTEGER,
    WasCompiled   INTEGER
)

### Question
Which repository has the longest amount of processed time of downloading? Indicate whether the solution paths in the repository can be implemented without needs of compilation.

### Hint
longest amount of processed time refers to max(ProcessedTime); the repository can be implemented without needs of compilation refers to WasCompiled = 1;

### SQL
SELECT DISTINCT T1.id, T2.WasCompiled FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.ProcessedTime = ( SELECT MAX(ProcessedTime) FROM Repo )
### Database Schema
CREATE TABLE sqlite_sequence(name,seq)

CREATE TABLE "Method"
(
    Id            INTEGER not null
        primary key autoincrement,
    Name          TEXT,
    FullComment   TEXT,
    Summary       TEXT,
    ApiCalls      TEXT,
    CommentIsXml  INTEGER,
    SampledAt     INTEGER,
    SolutionId    INTEGER,
    Lang          TEXT,
    NameTokenized TEXT
)

CREATE TABLE "MethodParameter"
(
    Id       INTEGER not null
        primary key autoincrement,
    MethodId TEXT,
    Type     TEXT,
    Name     TEXT
)

CREATE TABLE Repo
(
    Id            INTEGER not null
        primary key autoincrement,
    Url           TEXT,
    Stars         INTEGER,
    Forks         INTEGER,
    Watchers      INTEGER,
    ProcessedTime INTEGER
)

CREATE TABLE Solution
(
    Id            INTEGER not null
        primary key autoincrement,
    RepoId        INTEGER,
    Path          TEXT,
    ProcessedTime INTEGER,
    WasCompiled   INTEGER
)

### Question
What is the tokenized name of the solution whose path is "maravillas_linq-to-delicious\tasty.sln"?

### Hint
tokenized name refers to NameTokenized

### SQL
SELECT DISTINCT T2.NameTokenized FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'maravillas_linq-to-delicious'
### Database Schema
CREATE TABLE sqlite_sequence(name,seq)

CREATE TABLE "Method"
(
    Id            INTEGER not null
        primary key autoincrement,
    Name          TEXT,
    FullComment   TEXT,
    Summary       TEXT,
    ApiCalls      TEXT,
    CommentIsXml  INTEGER,
    SampledAt     INTEGER,
    SolutionId    INTEGER,
    Lang          TEXT,
    NameTokenized TEXT
)

CREATE TABLE "MethodParameter"
(
    Id       INTEGER not null
        primary key autoincrement,
    MethodId TEXT,
    Type     TEXT,
    Name     TEXT
)

CREATE TABLE Repo
(
    Id            INTEGER not null
        primary key autoincrement,
    Url           TEXT,
    Stars         INTEGER,
    Forks         INTEGER,
    Watchers      INTEGER,
    ProcessedTime INTEGER
)

CREATE TABLE Solution
(
    Id            INTEGER not null
        primary key autoincrement,
    RepoId        INTEGER,
    Path          TEXT,
    ProcessedTime INTEGER,
    WasCompiled   INTEGER
)

### Question
Among the repositories whose number of stars received are between 6,000 to 9,000, which repository has the highest number of solution paths and many of those solution paths needs to be compiled if user wants to implement it?

### Hint
Stars between 6,000 to 9,000; highest number of solution paths refers to max(count(Path)); needs to be compiled if user wants to implement it refers to WasCompiled = 0;

### SQL
SELECT T2.RepoId, COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars BETWEEN 6000 AND 9000 AND T2.WasCompiled = 0 GROUP BY T2.RepoId ORDER BY COUNT(T2.RepoId) DESC LIMIT 1
### Database Schema
CREATE TABLE sqlite_sequence(name,seq)

CREATE TABLE "Method"
(
    Id            INTEGER not null
        primary key autoincrement,
    Name          TEXT,
    FullComment   TEXT,
    Summary       TEXT,
    ApiCalls      TEXT,
    CommentIsXml  INTEGER,
    SampledAt     INTEGER,
    SolutionId    INTEGER,
    Lang          TEXT,
    NameTokenized TEXT
)

CREATE TABLE "MethodParameter"
(
    Id       INTEGER not null
        primary key autoincrement,
    MethodId TEXT,
    Type     TEXT,
    Name     TEXT
)

CREATE TABLE Repo
(
    Id            INTEGER not null
        primary key autoincrement,
    Url           TEXT,
    Stars         INTEGER,
    Forks         INTEGER,
    Watchers      INTEGER,
    ProcessedTime INTEGER
)

CREATE TABLE Solution
(
    Id            INTEGER not null
        primary key autoincrement,
    RepoId        INTEGER,
    Path          TEXT,
    ProcessedTime INTEGER,
    WasCompiled   INTEGER
)

### Question
In the "https://github.com/wallerdev/htmlsharp.git", give all the linearized sequenced of API calls.

### Hint
linearized sequenced of API calls refers to ApiCalls; 'https://github.com/wallerdev/htmlsharp.git' is url of repository

### SQL
SELECT T3.ApiCalls FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId INNER JOIN Method AS T3 ON T2.Id = T3.SolutionId WHERE T1.Url = 'https://github.com/wallerdev/htmlsharp.git'
### Database Schema
CREATE TABLE sqlite_sequence(name,seq)

CREATE TABLE "Method"
(
    Id            INTEGER not null
        primary key autoincrement,
    Name          TEXT,
    FullComment   TEXT,
    Summary       TEXT,
    ApiCalls      TEXT,
    CommentIsXml  INTEGER,
    SampledAt     INTEGER,
    SolutionId    INTEGER,
    Lang          TEXT,
    NameTokenized TEXT
)

CREATE TABLE "MethodParameter"
(
    Id       INTEGER not null
        primary key autoincrement,
    MethodId TEXT,
    Type     TEXT,
    Name     TEXT
)

CREATE TABLE Repo
(
    Id            INTEGER not null
        primary key autoincrement,
    Url           TEXT,
    Stars         INTEGER,
    Forks         INTEGER,
    Watchers      INTEGER,
    ProcessedTime INTEGER
)

CREATE TABLE Solution
(
    Id            INTEGER not null
        primary key autoincrement,
    RepoId        INTEGER,
    Path          TEXT,
    ProcessedTime INTEGER,
    WasCompiled   INTEGER
)

### Question
How many solution paths are there inside the 2nd most popular repository?

### Hint
more watchers mean that this repository is more popular; most popular repository refers to max(Watchers);

### SQL
SELECT COUNT(DISTINCT T2.Path) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Watchers = ( SELECT Watchers FROM Repo ORDER BY Watchers DESC LIMIT 1, 1 )