I have a table like the next:
TABLE 1
-------
ID Integer
COLUMN_1 Text
COLUMN_2 Text
COLUMN_3 Integer
How could I fetch the ids in which the combination of COLUMN_1
, COLUMN_2
and COLUMN_3
are repetead in the same column?
I count the columns repeated grouping it like next:
select column_1, column_2, column_3, count(*) from table_ 1 group by icolumn_1, column_2, column_3;
But what I'm looking for is how to also get the Ids.
Example
So if I have the next data:
ID | COLUMN_1 | COLUMN_2 | COLUMN_3
1 | BLUE | FISH | SEA
2 | BLUE | FISH | SEA
3 | BLUE | FISH | RIVER
I'm looking for a result like next:
IDs Repeated | COLUMN_1 | COLUMN_2 | COLUMN_3 | COUNT
1, 2 | BLUE | FISH | SEA | 2
3 | BLUE | FISH | RIVER | 1