MYSQL Database PIVOT and wants in specific format
I have tried to make it using GROUP BY in MYSQL, Hope this helps! 

SELECT
    channelid,
    deviceid,
    pointtime,
    SUBSTRING_INDEX(GROUP_CONCAT(pointvalue ORDER BY pointid ASC SEPARATOR '^'),'^',1) AS pointid3_1,
    SUBSTRING_INDEX(GROUP_CONCAT(pointvalue ORDER BY pointid ASC SEPARATOR '^'),'^',-1) AS pointid3_11
FROM
    Think.pointhistory
GROUP BY
    pointtime,
    channelid;