﻿CREATE VIEW [C6Mart].[vNumeroIntermediari] AS
SELECT RETE, COD_FISCALE, count(DISTINCT INTERMEDIARIO) as NumeroIntermediari
FROM  C6Mart.PATRIMONIO_TERZI
GROUP BY RETE, COD_FISCALE