	CREATE
	VIEW VIEW_SPED_C490
	AS
	(
	select 
		VD.CST, 
		VD.CFOP, 
		VD.TAXA_ICMS, 
		VC.DATA_VENDA,
		SUM(VD.VALOR_TOTAL) AS SOMA_ITEM, 
		SUM(VD.BASE_ICMS) AS SOMA_BASE_ICMS, 
		SUM(VD.ICMS) AS SOMA_ICMS 
	from 
		ECF_VENDA_DETALHE VD, ECF_VENDA_CABECALHO VC 
	where 
		VD.ID_ECF_VENDA_CABECALHO = VC.ID
		AND VD.CANCELADO = 'N'
	group by 
		CST, CFOP, TAXA_ICMS, DATA_VENDA
	)