how to write query for multiple columns in select and in group by only 1 column

  • Hello all

    My requirement is how to write query for multiple columns in select and in group by only 1 column. In this multiple columns of select , the first column i have used distinct. But i want to group by only one column that is 2nd, or 3rd or 4 th. Please tell me any one.

    Thanks

  • What grouping are you trying to accomplish (max,min,avg,sum etc) ?

    You could look at using over (partition by)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply