/* Given the following database schema: */
CREATE TABLE current
(
    ballotpedia_id      TEXT,
    bioguide_id         TEXT,
    birthday_bio        DATE,
    cspan_id            REAL,
    fec_id              TEXT,
    first_name          TEXT,
    gender_bio          TEXT,
    google_entity_id_id TEXT,
    govtrack_id         INTEGER,
    house_history_id    REAL,
    icpsr_id            REAL,
    last_name           TEXT,
    lis_id              TEXT,
    maplight_id         REAL,
    middle_name         TEXT,
    nickname_name       TEXT,
    official_full_name  TEXT,
    opensecrets_id      TEXT,
    religion_bio        TEXT,
    suffix_name         TEXT,
    thomas_id           INTEGER,
    votesmart_id        REAL,
    wikidata_id         TEXT,
    wikipedia_id        TEXT,
        primary key (bioguide_id, cspan_id)
)

CREATE TABLE "current-terms"
(
    address            TEXT,
    bioguide           TEXT,
    caucus             TEXT,
    chamber            TEXT,
    class              REAL,
    contact_form       TEXT,
    district           REAL,
    end                TEXT,
    fax                TEXT,
    last               TEXT,
    name               TEXT,
    office             TEXT,
    party              TEXT,
    party_affiliations TEXT,
    phone              TEXT,
    relation           TEXT,
    rss_url            TEXT,
    start              TEXT,
    state              TEXT,
    state_rank         TEXT,
    title              TEXT,
    type               TEXT,
    url                TEXT,
    primary key (bioguide, end),
    foreign key (bioguide) references current(bioguide_id)
)

CREATE TABLE historical
(
    ballotpedia_id             TEXT,
    bioguide_id                TEXT
            primary key,
    bioguide_previous_id       TEXT,
    birthday_bio               TEXT,
    cspan_id                   TEXT,
    fec_id                     TEXT,
    first_name                 TEXT,
    gender_bio                 TEXT,
    google_entity_id_id        TEXT,
    govtrack_id                INTEGER,
    house_history_alternate_id TEXT,
    house_history_id           REAL,
    icpsr_id                   REAL,
    last_name                  TEXT,
    lis_id                     TEXT,
    maplight_id                TEXT,
    middle_name                TEXT,
    nickname_name              TEXT,
    official_full_name         TEXT,
    opensecrets_id             TEXT,
    religion_bio               TEXT,
    suffix_name                TEXT,
    thomas_id                  TEXT,
    votesmart_id               TEXT,
    wikidata_id                TEXT,
    wikipedia_id               TEXT
)

CREATE TABLE "historical-terms"
(
    address            TEXT,
    bioguide           TEXT
            primary key,
    chamber            TEXT,
    class              REAL,
    contact_form       TEXT,
    district           REAL,
    end                TEXT,
    fax                TEXT,
    last               TEXT,
    middle             TEXT,
    name               TEXT,
    office             TEXT,
    party              TEXT,
    party_affiliations TEXT,
    phone              TEXT,
    relation           TEXT,
    rss_url            TEXT,
    start              TEXT,
    state              TEXT,
    state_rank         TEXT,
    title              TEXT,
    type               TEXT,
    url                TEXT,
    foreign key (bioguide) references historical(bioguide_id)
)

CREATE TABLE "social-media"
(
    bioguide     TEXT
            primary key,
    facebook     TEXT,
    facebook_id  REAL,
    govtrack     REAL,
    instagram    TEXT,
    instagram_id REAL,
    thomas       INTEGER,
    twitter      TEXT,
    twitter_id   REAL,
    youtube      TEXT,
    youtube_id   TEXT,
    foreign key (bioguide) references current(bioguide_id)
)

/* Answer the following: Who is the Pro-Administration senator that runs from March 4, 1789 to December 31, 1791? Pro-Administration refers to party = 'Pro-Administration'; senator refers to type = 'sen'; runs from March 4, 1789 refers to start = '1789-03-04'; runs to refers to end = '1791-12-31'; */
SELECT 
SELECT T1.first_name, T1.last_name FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Pro-Administration' AND T2.start = '1789-03-04' AND T2.end = '1791-12-31'