I have a situation where I have a Select with 6 fields but I only want to group by 3 fields.
As you know this looks not possible.
What do you do in these situations?
Thanks for any feedback
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It looks like you have a misunderstanding of how group by works. Look at this example:
All included columns must be either aggregated (as with LineTotal above – SUM) or grouped (as with SalesOrderID above). This will give a separate LineTotal sum for each SalesOrderID.
Group By doesn’t make sense without any aggregates.