Today's lesson pertains to more SQL language beginning with the GROUP by clauses, little examples are being shown on the projector for us, these kind of physical examples are a lot easier to digest than writing on the whiteboard. Group by must appear after the FROM and WHERE clauses, GROUP by groups rows into subgroups based on values of columns or expressions. Todd's example is used to group columns together to show a sum of total sales for a specific region. Another example of a group by rollup which is described as a niche function which caused some debate in class as to what it actually does. GROUP BY GROUPING SETS is used to allow multiple group-by clauses to operate in a single statement, GROUP BY GROUPING SETS is equivalent to the 'union' of two or more GROUP BY operation in the same result set. Next topic is Views within SQL, which is used to present the information data in a different point of view. This can simplify the access to specific information w...
Comments
Post a Comment