I have a table with three columns the first column indicates a message ID (message_id) the second column represents an ordinal feature which indicates the order of the message (message_order), lastly the third column is a fragment of the message(message_fragment):
+------------+---------------+------------------------------+
| message_id | message_order | message |
+------------+---------------+------------------------------+
| Message 1 | 2 | Best, Jose |
| Message 1 | 1 | Thanks for your advice |
| Message 2 | 1 | I only have one line of text |
+------------+---------------+------------------------------+
Is there a way in SQL to concatenate the message rows by message in order of message order? To ultimately get the following:
+------------+-----------------------------------+
| message_id | message |
+------------+-----------------------------------+
| Message 1 | Thanks for your advice Best, Jose |
| Message 2 | I only have one line of text |
+------------+-----------------------------------+