I have two tables:
CREATE TABLE Master (
url TEXT PRIMARY KEY,
masterId TEXT,
);
CREATE TABLE Version (
verId TEXT PRIMARY KEY,
isPending INTEGER,
masterId TEXT,
FOREIGN KEY(masterId) REFERENCES Master(masterId)
);
I want to select all pending url
s. Meaning all urls from Master
that has a row in Version
with the same masterId
and isPending = 1
.
How to write such nested select?