A group is defined by column a, b and c. Column x, y and z from each group are the same. Sample:
a|b|c|x|y|z| ....
1 1 1 p r s
1 1 1 p r s
1 1 1 p r s
2 1 2 t u v
2 1 2 t u v
I am looking to achieve the following however without using aggregate function (max(t.x), ...)
select t.a, t.b, t.c,count(*), t.x, t.y, t.z, ....
from t
group by t.a, t.b, t.c;
Is there any other function that can be used in the select statement to include columns x,y and z?
Would you rather use another join to add the descriptive column?