You need to use the DISTINCT
option:
GROUP_CONCAT(DISTINCT animal)
More Related Contents:
- MySQL: GROUP_CONCAT with LEFT JOIN
- Join vs. sub-query
- Find records from one table which don’t exist in another
- How do I update if exists, insert if not (AKA “upsert” or “merge”) in MySQL?
- Natural Sort in MySQL
- MySQL get row position in ORDER BY
- Subqueries vs joins
- MySQL Results as comma separated list
- MySQL unknown column in ON clause
- MySQL not using indexes with WHERE IN clause?
- SQL: Find the max record per group [duplicate]
- Group by month and year in MySQL
- Concatenate and group multiple rows in Oracle [duplicate]
- calculate a sum of type time using sql
- MySQL: Transactions vs Locking Tables
- Remove duplicates using only a MySQL query?
- Group by date only on a Datetime column
- Finding the next available id in MySQL
- How exactly does using OR in a MySQL statement differ with/without parentheses?
- MySQL: How to copy rows, but change a few fields?
- How to renumber primary index
- Query that ignore the spaces
- GROUP_CONCAT in SQLite
- mysql automatically store record creation timestamp
- How to convert from varbinary to char/varchar in mysql
- update columns values with column of another table based on condition [duplicate]
- I want to copy table contained from one database and insert onto another database table
- How to implement a Keyword Search in MySQL?
- In SQL how do I get the maximum value for an integer?
- Get the first and last date of next month in MySQL