use BaseCasadoCabelereiro;

SELECT LojaOrigem AS loja, sum(Total_Item)  AS VENDAS
    FROM
        memoria_VendasTodas
    WHERE
        [Data da Venda] >= '01/01/2023'
    AND
	[Data da Venda] <= '31/12/2023'
	AND
        Cancelado = 0
	AND Estornado = 0	

    GROUP BY
    LojaOrigem