T-SQL Server-GROUP BY Clause

                                                 T-SQL Server-GROUP BY Clause





What is GROUP BY ?


In SQL Group BY is a function used to query results from the groups of rows with the help of Aggregate functions.


It helps to generate quick reports and insights from data base.


Aggregate functions:


* Count


* Min


* Max


* Sum


* Avg




Ex: Assuming we have different category vegetables in basket.


Tomato, Potato, Brinjal all mixed in same bucket.


with the help of GROUP BY and AGGREGATE functions we will retrive data from database to analyze how many vegetables and varieties in basket.



Comments

Popular posts from this blog

SQL Case Study Finance Analysis

SQL Query Order of Execution

A Day in the Life of a Data Analyst Interviewee