I have the following table scenario:
+-------------------------------------------------------------+
| ID | DATA | PROFISSAO | SEQUENCIA |
+-------| --------------|-----------------------|-------------+
| 1 | 2018-01-01 | Professor | 1 |
| 1 | 2018-02-01 | Ator | 2 |
| 1 | 2018-03-01 | Bombeiro | 3 |
| 2 | 2018-01-01 | Comerciante | 1 |
| 2 | 2018-02-01 | Motorista | 2 |
| 2 | 2018-03-01 | Analista | 3 |
+-------------------------------------------------------------+
But I want to get the following:
+---------------------------------------------------------------------------------------+
|ID | DATA |PROFISSAO |DATA |PROFISSAO |DATA |PROFISSAO |
+---|---------------|---------------|-----------|---------------|-----------|-----------|
|1 | 2018-01-01 |Professor |2018-02-01 |Ator |2018-03-01 |Bombeiro |
|2 | 2018-01-01 |Comerciante |2018-02-01 |Motorista |2018-03-01 |Analista |
+---------------------------------------------------------------------------------------+
The SEQUENCE column has been enumerated (a rank in this case).
It turns out that the PIVOTs I see transform the values into the columns and do not add up at the front.
It does not need to be a dynamic value because I know how many lines at most I will have, in which case they will be 3.