I am new to SQL, can you please help me in retrieving the values as per below screen shot
[![enter image description here](https://i.stack.imgur.com/L02Kj.png)](https://i.stack.imgur.com/L02Kj.png)

and below is my backend query results. 

[![enter image description here](https://i.stack.imgur.com/m2Wzp.png)](https://i.stack.imgur.com/m2Wzp.png)
For an instance, if DEG is 0, I should get the corresponding values(for height 5) ' i.e. (0.91,-0.29, -1.78,-2.05 etc). Similarly i have to group and display the values as per the screenshot L02Kj.png. Please let me know if you need more information