Why dont you create another column which is sum of ID+ZONE
like below
create table profile
(
id int,
zone text,
idZone text
data blob,
primary key ((idZone))
);
and do like this SELECT data FROM profile WHERE idZone IN (:idZones)