Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WITH notas_testes as(
- SELECT
- ft.inscricao,
- ft.nota_num,
- ft.idteste,
- a.nome,
- ft.unidade
- from [Easy395].[dbo].[aluno] a
- INNER JOIN [Easy395].[dbo].[faz_teste] ft
- ON a.inscricao = ft.inscricao
- )
- select *
- from notas_testes
- PIVOT (SUM(nota_num) FOR idteste IN ([SENEM_01], [SENEM_02], [SENEM_03]))pvt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement