How to transpose by grouping the column
time tag value 10 abc 67 11 abc 68 12 abc 65 10 cdf 23 11 cdf 24 12 cdf 25 to time abc cdf 10 67 23 11 68 24 12 65 25
How to transpose by grouping the column
time tag value 10 abc 67 11 abc 68 12 abc 65 10 cdf 23 11 cdf 24 12 cdf 25 to time abc cdf 10 67 23 11 68 24 12 65 25
This is a simple pivot query like this:
SELECT time
SUM(IF(tag='abc',value,NULL)) AS abc,
SUM(IF(tag='cdf',value,NULL)) AS cdf
FROM yourTable
GROUP BY time
I hope to be helpful for you :)