All Forums Analytics
15 Aug 2008
Group By and many columns

Hello!Is there any quicker way to do a GROUP BY when you have many columns other than listing them all?So, instead of:GROUP BY 1,2,3,4,5,6,7,8,9,10,etc...Is there anything like:GROUP BY ALL EXCEPT 2 (or similar)I am pretty sure there isn't but thought I'd check.ThanksAndrew

Andrew Livingston EMEA - Customer Education Consultant Teradata UK 206 Marylebone Road London NW1 6LY United Kingdom M: +44 7785 971 080 E-mail:
j355ga 100 posts Joined 12/05
18 Aug 2008

If you just want unique values you can use DISTINCT, but this can have slower performance than the group by. You can also use ordered analytical functions in place of the group by otherwise the answer to your question is "no you can't do that."


You must sign in to leave a comment.