Hi.
Without the real data, it looks like the table design could use some
normalization work: it seems there is too much data repeated in table d.
But yes, in the situation on hand, GROUP BY is a reasonable use.
Alternatively use DISTINCT, which will result in the same:
SELECT DISTINCT c.c1,c.c2
Good day to you all.
This is not a problem so much as checking that I am not missing
something obvious, before I change the way my mind deals with this type
of situation in MySQL.
I have two tables
Table c:
+-+-+
| c1 | c2 |
+-+-+
| 1 | foo |
| 2 | bar |
+-+-+
Ta