As a temporary work-around, please try modifying your query by putting a single "+" in from of the node_from in the WHERE clause: > ~~~ SELECT count(_rowid_) FROM edge WHERE +node_from IN temp.sub_nodes AND node_to IN temp.sub_nodes; -- ^-- extra "+" here ~~~