Which ever "structure" you use to display the results you cannot get away from the fact that the query will return your data as
|id | versions|
|----|-------- |
|101 | 0.0 |
|101 | 1.0 |
|101 | 2.0 |
|101 | 3.0 |
It has to, otherwise how would you know that version 2.0 belongs with id 101?
As Richard has already pointed out, the place to start presenting these results in a different way is in the Presentation or UI layer. In this case you might want to consider populating a TreeView - e.g see
TreeView (JavaFX 8)[
^]