Mysql query with dynamic columns

0

Friends have a question .... I have the following tables in Mysql:

alunos (id, nome, etc)
turmas (id, turma, etc)
matricula (id, turmaID, alunoID)
disciplinas (id, turmaID)
avaliacoes (id, avaliacao)
notas (id, matriculaID, disciplinaID, avaliacaoID, nota)

I can perform the query using JOIN in a satisfactory way and return the information correctly. The evaluations will be the same for each discipline, however the amount of evaluations is variable. As such, student grades are returned row by row. Would it be possible to put together a student's grading notes on the same line in a Query?

EX: 
disciplina   aluno          Nota1   Nota2   Nota3
Matemática | joao manoel  | 10    | 8     | 9

I hope I have been able to express myself ... Thanks in advance for all your help!

    
asked by anonymous 14.09.2016 / 01:11

0 answers