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.