I have a mysql query with a join and I want for each match to get one only row not all. What I mean.
for example we have the two tables
ids(int id)
colors(int id, varchar color)
I have the query
select ids.id, colors.color from ids join colors on ids.id = colors.id;
and get the following
id | color
------------------
1 | red
1 | blue
2 | yellow
3 | green
3 | pink
I want a query to get the
id | color
-----------------
1 | red
2 | yellow
3 | green