Você está na página 1de 1

---- ver as vendas de dezembro ----

select nota_fiscal_id, outra_nota_id,numero_nota,cfop_id, usuario_alteracao, usu


ario_insercao, data_cadastro, valor_total_nota from notas_fiscais
where data_entrada between '01/12/2010' and '31/12/2010' and outra_nota_id is no
t null and usuario_insercao = 79
and cfop_id in ('5.102', '5.405')
order by valor_total_nota
---- ver as devoluções de janeiro ----
select nota_fiscal_id, outra_nota_id,numero_nota,cfop_id, usuario_alteracao, usu
ario_insercao, data_cadastro, valor_total_nota from notas_fiscais
where data_cadastro between '01/01/2011' and '31/01/2011' and outra_nota_id is n
ot null and usuario_insercao = 79
and cfop_id in ('1.202', '1.411')
order by valor_total_nota
---- ver entregas não transferidas pela Iara ----
select produto_id, quantidade from itens_entregas where entrega_id in
(select entrega_id from entregas where empresa_geracao_id <> empresa_id and data
_cadastro = '31/12/2010')
order by entrega_id

Você também pode gostar