Skip to content
Advertisement

Join the records with sql?

I have a table with those 5 rows.

And I want to change it to below with DONE only.

How can I join them to show the result?

Advertisement

Answer

If I understand correctly that you want one row per code, you can use aggregation:

Note that SQL tables represent unordered sets. With your sample data, there is no way to preserve “the original” order of the values, because that is undefined — unless another column specifies that ordering.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement