I have a post table with a category field, each post you enter can get more than one category:
post1 categoria1, categoria2
post2 categoria1, categoria3
How can I perform a sql query to join the duplicate categories and have a result like this:
categoria1, categoria2, categoria 3
instead of categoria1, categoria2, categoria1, categoria 3
SELECT post_category FROM
posts group by post_category
result: Empresas, Ecônomia, ESPN, Ecônomia
I have only two posts each with 2 categories