Learn Python
Learn Data Structure & Algorithm
Learn Numpy
Learn Pandas
Learn Matplotlib
Learn Seaborn
Learn Statistics
Learn Math
Learn MATLAB
Learn Machine learning
Learn Github
Learn OpenCV
Learn Deep Learning
MySQL Introduction
MySQL Setup
MySQL Operators
MySQL Basic Works
MySQL Create Table
MySQL insert and get values
MySQL Condition
MySQL GROUP BY
MySQL Case
MySQL sorting and calculate avg,sum,count
MySQL Update
MySQL Time
MySQL String
MySQL Rollback & Commit
MySQL Join and Concatenate
MySQL Index
MySQL Date
MySQL View
MYSQL With Python
Learn MongoDB
Learn Web scraping
Learn Excel
Learn Power BI
Learn Tableau
Learn Docker
Learn Hadoop
GROUP BY create groups of those rows which contain the same values. This GROUP BY statement is used with
aggregate functions like (MAX(), COUNT(), AVG(), SUM(), MIN() ) to group the result-set by one or more
columns. We can also use condition to create groups.
Example: find the number of sells man in each country?
Here we will create a group of sells man according to the county. Because we want to get the number of sells
man, so in aggregate functions, we can use sum.
Suppose we have total 12 rows and in the country column, we have total 3 different counties. So Here we will
get total three groups and the groups values will be the sum of the total sells man contained by each
country.
This way GROUP BY works.