fix #20 thanks to @matthijsln
use subquery instead of list of id's.