I have this table
-visitId- | -vital- |-value-
43475 | vital-pulse | 1
42818 | vital-tempreture | 37
42818 | vital-pulse | 37
43475 | vital-tempreture | 103
57126 | vital-tempreture | 37.5
57126 | vital-pulse | 5
All the values in the column -vital- belongs to vital-pulse and vital-temperature I want these 2 categories to be 2 columns with respective vital values against each column showing with the visit ID. I tried pivot aggregating with -visitId- column, but how to have it in final output?
Desired output as following
-visitId- | -vital-tempreture- |-vital-pulse- |
42818 | 37 | 37 |
43475 | 103 | 1 |
57126 | 37.5 | 5 |