Use GROUP_CONCAT()
for this, with a GROUP BY
covering the other three columns:
SELECT
name, -- Microsoft
other, -- GGG
other2, -- 1
GROUP_CONCAT(id) AS ids
FROM tbl
GROUP BY name, other, other2
More Related Contents:
- Getting the SUM() of claps and at the same time counting bookmarks in one query
- mysql – I dont understand what this means, can anyone explain each line of the script to me? [closed]
- How to filter SQL results in a has-many-through relation
- Return row only if value doesn’t exist
- How to delete from multiple tables in MySQL?
- INSERT with SELECT
- How to get list of dates between two dates in mysql select query [duplicate]
- mysql update column with value from another table
- difference between primary key and unique key
- Illegal mix of collations MySQL Error
- SQL query: Delete all records from the table except latest N?
- SQL order string as number
- Rename a column in MySQL
- Find most frequent value in SQL column
- How to convert number of week into date?
- update multiple rows using limit in mysql?
- Mysql 1050 Error “Table already exists” when in fact, it does not
- How to get the latest record in each group using GROUP BY? [duplicate]
- SQL Query to get column values that correspond with MAX value of another column?
- When to use SELECT … FOR UPDATE?
- Setting column values as column names in the SQL query result
- How do I UPDATE a row in a table or INSERT it if it doesn’t exist?
- SQL unique varchar case sensitivity question
- How to get current date & time in MySQL?
- How do I count columns of a table
- Laravel join with 3 Tables
- How to regex in a MySQL query
- Why MySQL is giving error “Not allowed to return a result set from a function”?
- MySQL 5.6 – DENSE_RANK like functionality without Order By
- Syntax error on MERGE statement