For all words cited in paper ID 315017, state the other paper ID and class label which also cited those words.
SELECT T1.class_label, T2.word_cited_id FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id WHERE T1.paper_id = 315017
CREATE TABLE cites
(
    cited_paper_id  TEXT not null,
    citing_paper_id TEXT not null,
    primary key (cited_paper_id, citing_paper_id)
);
CREATE TABLE paper
(
    paper_id    TEXT  not null
        primary key,
    class_label TEXT not null
);
CREATE TABLE content
(
    paper_id     TEXT not null,
    word_cited_id TEXT not null,
    primary key (paper_id, word_cited_id),
    foreign key (paper_id) references paper(paper_id)
);
