Random musings - Group by
Page 1 of 1 • Share •
Random musings - Group by
Is the Group by clause in a Select statement redundant? Why is it even needed?
Hoping to get your thoughts.
Edwin
Hoping to get your thoughts.
Edwin
Edwin Kurian- Posts: 13
Join date: 2009-02-03
Location: Milwaukee

Re: Random musings - Group by
Because the DBMS requires it.

BoxesAndLines- Posts: 621
Join date: 2009-02-03
Location: USA
Re: Random musings - Group by
That is what I am trying to understand...Why does the DBMS need it.
Logically if any columns are aggrergated, shouldn't the SQL group by the other columns?
Is there a case where some columns are aggregated, and some of the other columns are not part of the group by?
Logically if any columns are aggrergated, shouldn't the SQL group by the other columns?
Is there a case where some columns are aggregated, and some of the other columns are not part of the group by?
Edwin Kurian- Posts: 13
Join date: 2009-02-03
Location: Milwaukee

Over partition
It depends on database engine.
Please search in google info about "over partition" clause.
With this you can combine aggregated data with detail data.
Sergi
Please search in google info about "over partition" clause.
With this you can combine aggregated data with detail data.
Sergi
slaborda- Posts: 3
Join date: 2009-02-18
Age: 34
Location: Barcelona, Via lactea, earth, Europe, Spain, Barcelona
Similar topics» Random Derek
» Random Youtube Videos
» Auto RANDOM Themes FORUM
» Random musings - Group by
» Shawn20's Random Art! (UPDATE)
» Random Youtube Videos
» Auto RANDOM Themes FORUM
» Random musings - Group by
» Shawn20's Random Art! (UPDATE)
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum