CREATE
VIEW VIEW_SPED_C300
AS

select 
	SERIE, 
	SUBSERIE, 
	DATA_EMISSAO, 
	SUM(TOTAL_NF) AS SOMA_TOTAL_NF, 
	SUM(PIS) AS SOMA_PIS,
	SUM(COFINS) AS SOMA_COFINS 
from 
	ECF_NOTA_FISCAL_CABECALHO
group by 
	SERIE, SUBSERIE, DATA_EMISSAO