i have a little question. My problem is that i have a table with a single column with sensor data. Every third row represents a new sample. My target is right now to transform every third row to a seperate column like a 3 x N matrix. I dont know how big my N becomes. Is it possible to do this with SQL?
--VALUES--
sensor_sampleA1
sensor_sampleA2
sensor_sampleA3
sensor_sampleB1
sensor_sampleB2
sensor_sampleB3
...
...
...
sensor_sampleN1
sensor_sampleN2
sensor_sampleN3
I want this.
--TARGET_TABLE--
sampleA1 sampleB1 sampleC1 ... ... sampleN1
sampleA2 sampleB2 sampleC2 ... ... sampleN2
sampleA3 sampleB3 sampleC3 ... ... sampleN3
UPDATE: I used the number 3 above as example. I have 11 sensors which give me 11 values per second. My columns are: sensor_data_id, axis, source, type, value and sample_id.