Hi, I would like to know your opinion about the best approach to the problem that I present to you:
- I have an entity defined as follows:
3ab4955 …, leganes, butcher, sales, 2000
45bxt333 …, leganes, butchers, shopping, 500
I would like to move the measures to columns as follows: “pivot rows to columns”:
Id description1 description2 descriptionMeasure descriptionMeasure …
2adx3… leganes butcher sales shopping …
Does jpql support this type of queries? (Crosstab or pivot)
-I would like to represent it in a table, the number of measures is not fixed, it is variable so I would have to construct the table dynamically based on the fields returned by the query.
I would need to do calculations dynamically based on fields returned by the query (I have to think how to do it) and represent them, as these calculations have to be made on the fly, could I support addGeneratedColumn?
I would use GroupTable since I need to summarize the columns for each of the groups, can you summarize the columns built dynamically and with generatedColumn ?
Thanks and regards.