I have the following columns in my table: alias, first, last. I would like to concatenate the rows & then search for distinct values: i.e.
- jimmyWho, Jim, Smith
- BallyHo, Bob, Smith
- JimmytwoShoes, Jim, Smith
- Bobtastic, Bob, Johnson
- JimmytwoShoes, Jim, Smith
- BallyHo, Dave, Jones
I would like to have the following results (notice that #5 above is a duplicate):
- jimmyWho, Jim, Smith
- BallyHo, Bob, Smith
- JimmytwoShoes, Jim, Smith
- Bobtastic, Bob, Johnson
- BallyHo, Dave, Jones
In other words, I need to concatenate the rows & then search for distinct values only AFTER I've concatenated...doing so b/f the concatenation would not give the desired results. Is there a way to do this in Mysql?