select * from produtos_notaentrada where id_produto = 0 and primaria in (select primaria from lventradas where entrada between('2012-02-01') and ('2012-02-29'))