Advertisement
Guest User

Untitled

a guest
Jun 29th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. WITH notas_testes as(
  2. SELECT
  3. ft.inscricao,
  4. ft.nota_num,
  5. ft.idteste,
  6. a.nome,
  7. ft.unidade
  8. from [Easy395].[dbo].[aluno] a
  9. INNER JOIN [Easy395].[dbo].[faz_teste] ft
  10. ON a.inscricao = ft.inscricao
  11. )
  12.  
  13. select *
  14. from notas_testes
  15. PIVOT (SUM(nota_num) FOR idteste IN ([SENEM_01], [SENEM_02], [SENEM_03]))pvt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement