Random musings - Group by
3 posters
Page 1 of 1
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
Re: Random musings - Group by
Because the DBMS requires it.
BoxesAndLines- Posts : 1212
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?
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 : 46
Location : Barcelona, Via lactea, earth, Europe, Spain, Barcelona
Similar topics
» accumulating snapshot -random # of status
» Medical Data - Building a reporting Data Warehouse
» How to lookup a small group of records as one
» Business keys or Natural keys in the Fact table
» Where to Begin, which Kimball Group Book
» Medical Data - Building a reporting Data Warehouse
» How to lookup a small group of records as one
» Business keys or Natural keys in the Fact table
» Where to Begin, which Kimball Group Book
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|