Created
May 14, 2018 10:07
-
-
Save tfgrahame/94dd6a9c4b47f51aa0d259985f1c42fe to your computer and use it in GitHub Desktop.
group_concat-genres
This file contains hidden or 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 DISTINCT | |
pg.pid, | |
GROUP_CONCAT(g.topleveltext, | |
' | ', | |
g.secondleveltext, | |
g.thirdleveltext | |
SEPARATOR ' | ') AS 'genres' | |
FROM | |
pip_genre pg | |
JOIN | |
genre g ON g.genre_id = pg.genre_id | |
GROUP BY pg.pid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment