Torna al Thread

select codcomune, comune, codiceordinaento, sum(totstrutture) as totstrutture, sum(totcamere) as totcamere, sum(totletti) as totletti, sum(totbagni) as totbagni from ( select codcomune,comune,codiceordinamento,count(codiceordinamento) as totstrutture, totcamere,totletti,totbagni from #prova group by codcomune, comune, CodiceOrdinamento, totcamere, totletti, totbagni ) as temp group by codcomune, comune
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5