Issue in grouping in select query

Database

Issue in grouping in select query

Can anyone please let me know if there is a way to do group by upon  selected non aggregrated columns out of all the non aggregrated columns

what i require is as follows:

I am doing a  select query on 14 columns out of which there are 8 non aggregrated columns, but I want to do group by upon one column only (I know that in group by we need to provide all the non aggregrated columns, but if I do group by on all the 8 columns, output will never come as expected).

So can anyone please help me to do it using group by or can any provide me alternative to the issue.

1 REPLY
Enthusiast

Re: Issue in grouping in select query

Group by rollup may help you out, 

check SQL Fuctions,Operators,Expressions and Predicates for your release.

Rglass