Last active
September 22, 2021 06:42
-
-
Save rustam-swe/c7529d02b634ecb1989e6f93aad39901 to your computer and use it in GitHub Desktop.
Concat cells (rows) of one column by another column
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
# column_name - column name filter by | |
# column_name_2 - column name to concat | |
# table_name - table name :) | |
SELECT column_name, | |
GROUP_CONCAT(DISTINCT column_name_2 SEPARATOR ',') | |
FROM table_name | |
GROUP BY column_name; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment