1
I have a table with the data:
unidade tipo valor
1 2 10,00
1 3 15,00
2 2 16,00
3 3 10,00
3 1 25,00
I need to make a select with pivot that brings me
unidade tipo1 tipo2 tipo3
1 0,00 10,00 15,00
2 0,00 16,00 0,00
3 25,00 0,00 0.00
How do I do that?
it would be interesting if you put the table structure and what you have tried to do, click on edit and modify your question by making it clearer.
– Marco Souza
Pedro, welcome to Stack Overflow. At GOKU’s suggestion you could edit your question including the DDL of the table. Also include the database you are using in the question (some databases have better support than others, your answer may vary depending on the DBMS).
– Anthony Accioly