For example I have following table
[id, V1, V2]
[A , 1 , 5]
[A , 2 , 4]
[A , 3 , 3]
[A , 4 , 2]
[B , 9 , 6]
[B , 8 , 7]
[B , 7 , 8]
[B , 6 , 9]
I Want to create query with following result
[id, V1` , V2` ] ]
[A , [1,2,3,4] , [5,4,3,2] ]
[B , [9,8,7,6] , [6,7,8,9] ]
OR
[id, min , max ]
[A , [1] , [5] ]
[B , [6] , [9] ]
How this query can be costructed ? I allready tried a lot of options but failed.
Any help will be appriciated. Thanks in advance
Try this:
Hope it helps
Regards