the code I'm using:
select
ccc.Descripcion AS Grado,
p.CodPersona AS Codigo,
p.NombreCompleto AS Nombre,
cc.Detalle AS Detalle,
SUM(cc.Valor) AS Valor
from Cuenta cc
inner join AlumnoDB.dbo.Alumno a on cc.IdAlumno = a.CodAlumno
inner join AlumnoDB.dbo.Matricula m on cc.IdAlumno = m.CodAlumno
inner join AlumnoDB.dbo.Curso ccc on m.CodCurso = ccc.CodCurso
inner join AlumnoDB.dbo.Persona p on a.CodPersona = p.CodPersona
where cc.Detalle is not null
and cc.Valor != 0.00
group by cc.Detalle,
ccc.Descripcion,
p.CodPersona,
p.NombreCompleto
Show me this result:
that the resgitros become columas EYE: (that result the grouping of 12 records, and there will only be 3 (Discount, monthly fee and record) types of details for N records) I want that Discount and monthly payment are as column and invoice left hidden.
now how can I show it like this: