SQL - exemplo com sum

Top  Previous  Next

Select C.nome, Sum(P.Total) as Soma, Min(P.Data) as Data,

         (Sum(P.Total) * 2as Duplo, 

         (Sum(P.Total) * 2) / 100 as Legal from Prazo p

Left Join Clientes C on P.CodCliente=C.Cod 

Group by C.nome