Created
September 25, 2016 08:16
-
-
Save Chetan496/ceb9c14ce9b53497e8071b637f869d59 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT id, instanceId, processModelId, GROUP_CONCAT(CONCAT_WS("=", variableName, oldValue)) AS OLDVALUE, | |
GROUP_CONCAT(CONCAT_WS("=", variableName, newValue)) AS NEWVALUE , parentVariableName FROM `Object_History` | |
GROUP BY instanceId, parentVariableName; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A better version:
SELECT id, instanceId, processModelId, GROUP_CONCAT(CONCAT_WS("=", variableName, oldValue) SEPARATOR ", ") AS OLDVALUE,
GROUP_CONCAT(CONCAT_WS("=", variableName, newValue) SEPARATOR ", ") AS NEWVALUE , parentVariableName FROM Object_History
GROUP BY instanceId, parentVariableName;