Answer the question
In order to leave comments, you need to log in
Sort by one column. How to avoid adding others to GROUP BY?
Greetings.
Faced one problem, a sorting problem. I have view A, its logic looks like this:
select id as acc_id, name as acc_name, sum(numberValue) as acc_value from accounts group by id, name
select acc_id, acc_name, acc_value from views.A group by acc_id
Answer the question
In order to leave comments, you need to log in
so why group by name if id already provides uniqueness? try grouping by id only
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question