I have the following table in a SQLite3 database:
CREATE TABLE overlap_results (
neighbors_of_annotation varchar(20),
other_annotation varchar(20),
set1_size INTEGER,
set2_size INTEGER,
jaccard REAL,
p_value REAL,
bh_corrected_p_value REAL,
PRIMARY KEY (neighbors_of_annotation, other_annotation)
);
I would like to execute the following query:
SELECT * FROM overlap_results WHERE
(neighbors_of_annotation, other_annotation)
IN (('16070', '8150'), ('16070', '44697'));
That is, I have a couple of tuples of annotation identifiers, and I would like to get entries for each of these tuples. The sqlite3 query gives me the following error:
SQL error: near ",": syntax error
How to correctly express this as an SQL statement?
EDIT I understand that I didn’t explain very well what I really was after. Let me try another crack.
If a person gives me an arbitrary list of terms in neighbors_of_annotationwhich they are interested in, I can write an SQL statement, as shown below:
SELECT * FROM overlap_results WHERE
neighbors_of_annotation
IN (TERM_1, TERM_2, ..., TERM_N);
, , (TERM_1,1, TERM_1,2), (TERM_2,1, TERM_2,2),..., (TERM_N,1, TERM_N,2), TERM_i,1 neighbors_of_annotation TERM_i,2 other_annotation. SQL ()?
, , ,
, . AND /
OR .