SQL Group By: An Explanation and How To Use It

  Рет қаралды 94,438

Database Star

Database Star

Күн бұрын

Пікірлер: 86
@goobygoobdisney
@goobygoobdisney Жыл бұрын
I don't usually comment on tutorial videos, but this video is so clear I just want you to know how helpful you are for beginners like me
@DatabaseStar
@DatabaseStar Жыл бұрын
Glad it was helpful!
@sebastianhernandez9631
@sebastianhernandez9631 Жыл бұрын
I'm preparing for DP-900 exam and I was having a hard time with the Group By statement and aggregate functions. This video has helped me understand it perfectly. Thanks! Subscribed.
@DatabaseStar
@DatabaseStar Жыл бұрын
Thanks! I'm glad the video helped you understand it.
@rickvazquez6578
@rickvazquez6578 2 жыл бұрын
Mate you clarified something for me, I was wondering why I always had to add every other column I had to group by :) plenty helpful keep up the great tutorials!😃
@DatabaseStar
@DatabaseStar 2 жыл бұрын
Glad it helped you understand the concept further!
@rjjalaparthi545
@rjjalaparthi545 2 ай бұрын
Clear cut explanation, i always had doubt why we need to group by column which we used in select statement when we use aggregate functions in select, now its so clear. Thanks for the help
@DatabaseStar
@DatabaseStar 2 ай бұрын
Glad it was helpful!
@manojkumar-yc4xq
@manojkumar-yc4xq 5 ай бұрын
What a clean and easy way of explaining the fact. Thank you SIR.
@DatabaseStar
@DatabaseStar 5 ай бұрын
You're welcome!
@ordinaryperson-my7qr
@ordinaryperson-my7qr 2 жыл бұрын
thanks sooooo much dude i NEVER wrapped my head around how this works now i am crystal clear :)
@DatabaseStar
@DatabaseStar 2 жыл бұрын
Awesome, good to hear!
@akanirokingsley3304
@akanirokingsley3304 7 ай бұрын
your explanations resonates with me on a deep level.
@DatabaseStar
@DatabaseStar 7 ай бұрын
This makes me happy. I’m glad the explanations help you!
@lexiwhitmore2197
@lexiwhitmore2197 Жыл бұрын
This was helpful and clear, thank you! I liked your group by question, because I tend to create a question like that when I'm struggling to formulate the correct query.
@DatabaseStar
@DatabaseStar Жыл бұрын
Glad it was helpful!
@user-iv9sh9fc3c
@user-iv9sh9fc3c 6 ай бұрын
you are definitely a database star. Thank you
@DatabaseStar
@DatabaseStar 6 ай бұрын
Thanks!
@thebigcheese1153
@thebigcheese1153 8 ай бұрын
Thanks for actually explaining it.
@DatabaseStar
@DatabaseStar 8 ай бұрын
You’re welcome!
@COOKINGBIRD
@COOKINGBIRD Жыл бұрын
Your SQL video was exactly what I needed. Thank you for explaining it so clearly. 😄🎬💻🔍
@DatabaseStar
@DatabaseStar Жыл бұрын
Thanks, glad you liked it!
@khawar1690
@khawar1690 7 ай бұрын
Very well explained. Aggregated function was helpful to me. Thank you
@DatabaseStar
@DatabaseStar 7 ай бұрын
Glad it was helpful!
@diamondsandlipgloss
@diamondsandlipgloss 5 ай бұрын
1:18 why do we need the parenthesis around the asterisk in the SELECT FROM statement?
@DatabaseStar
@DatabaseStar 5 ай бұрын
Good question. It's because the word COUNT is a function, and functions need to have brackets at the end of the name so they can run. Inside the brackets for functions, we specify parameters, such as values or columns to be processed by the function. The COUNT function can count columns: for example, COUNT(first_name) counts the number of first_name values that are not NULL. The asterisk is a different parameter to the COUNT function, and it means "count the entire row". So, COUNT(*) means count the entire row. Hope that answers your question.
@diamondsandlipgloss
@diamondsandlipgloss 4 ай бұрын
@@DatabaseStar got it, SO VERY helpful i don't know how i'll remember all of this 🤦🏾‍♀️
@aashutosh937
@aashutosh937 2 жыл бұрын
Thank you for explaining it in such a simple way :)
@DatabaseStar
@DatabaseStar 2 жыл бұрын
You're very welcome!
@dragoneer8756
@dragoneer8756 Жыл бұрын
Good to know, most important part was that the field selected should be in the group by clause. THey completely left that out in class
@DatabaseStar
@DatabaseStar Жыл бұрын
Glad you liked the video. Can’t believe they left that out of your class!
@dragoneer8756
@dragoneer8756 11 ай бұрын
@@DatabaseStar It was a very rushed class tbh. Teaching finished at the beginning of November so I'm self-studying for finals😅😅
@leonsant-jennings7417
@leonsant-jennings7417 Жыл бұрын
Cheers boss, I knew I had to use Group By but I didn't fully understand why.
@DatabaseStar
@DatabaseStar Жыл бұрын
Thanks, glad it was helpful!
@tsunamio7750
@tsunamio7750 10 ай бұрын
Nice video! Your indentation hurts me, but thank you for this video; It is very well presented!
@DatabaseStar
@DatabaseStar 10 ай бұрын
Thanks! Do you prefer a different style of indentation for SQL code?
@nickjoseph2711
@nickjoseph2711 2 жыл бұрын
Super helpful. First slide's visual really helped...
@DatabaseStar
@DatabaseStar 2 жыл бұрын
Glad you liked it!
@mrjump6745
@mrjump6745 Жыл бұрын
very detailed. clear. beautiful thanks ALOT really helpful
@DatabaseStar
@DatabaseStar Жыл бұрын
Glad it was helpful!
@Aliyaaugust
@Aliyaaugust 5 ай бұрын
Great explanation 💯🤍🤍🤍
@DatabaseStar
@DatabaseStar 5 ай бұрын
Thanks!
@jatinsharma8353
@jatinsharma8353 Жыл бұрын
awesome most easiest explanation. Thanks man
@DatabaseStar
@DatabaseStar Жыл бұрын
Glad it helped!
@DCh-ks6ug
@DCh-ks6ug 8 ай бұрын
that waaaaas veeeeery helpful thaaaaaank you
@DatabaseStar
@DatabaseStar 8 ай бұрын
You're welcome!
@higiniofuentes2551
@higiniofuentes2551 Жыл бұрын
Thank you for this very useful video!
@DatabaseStar
@DatabaseStar Жыл бұрын
No problem, glad you liked it!
@mustaphaelouahabi9316
@mustaphaelouahabi9316 Жыл бұрын
👋 Bravo! A very well-explained demo!
@DatabaseStar
@DatabaseStar Жыл бұрын
Thanks!
@mustaphaelouahabi9316
@mustaphaelouahabi9316 Жыл бұрын
@@DatabaseStar....... You're very welcome! Can you please make a crash course about "MySQL for Advanced Data Analytics"?
@arvindt553
@arvindt553 9 ай бұрын
Can you please give an example with two tables that have many to many relationships
@DatabaseStar
@DatabaseStar 9 ай бұрын
Good idea, I can do that.
@bot299i82
@bot299i82 5 ай бұрын
😂 nobody understand group by
@DatabaseStar
@DatabaseStar 5 ай бұрын
It can be hard to understand
@Mike-vj8do
@Mike-vj8do Жыл бұрын
real good video, thank you!
@DatabaseStar
@DatabaseStar Жыл бұрын
You’re welcome!
@statesman6379
@statesman6379 Жыл бұрын
My only question is if you have 3 columns in the Select Statement with an aggregate function, for example, is it mandatory to always include all 3 columns in the group by clause? And if not, then how do we know which of the 3 columns must be included?
@DatabaseStar
@DatabaseStar Жыл бұрын
Good question. Yes, it's mandatory to include all three columns in the Group By clause. If you don't, you'll get an error about columns in the Select not in the Group By (the exact error will depend on the database vendor). The only exception is some versions of MySQL allow you to have a mismatch between the Group By and the Select. But you'll get a result that won't be correct, such as showing the first group only but the aggregate function on all rows.
@statesman6379
@statesman6379 Жыл бұрын
@@DatabaseStar Thanks for the awesome reply! I just subscribed.
@salmaa7810
@salmaa7810 Жыл бұрын
very helpful; thank you!
@DatabaseStar
@DatabaseStar Жыл бұрын
Thanks!
@SpringRain23
@SpringRain23 2 жыл бұрын
Excellent video !
@DatabaseStar
@DatabaseStar 2 жыл бұрын
Glad you liked it!
@douaz6905
@douaz6905 2 ай бұрын
Thank you very much
@DatabaseStar
@DatabaseStar 2 ай бұрын
You’re welcome!
@Entertainmentmod
@Entertainmentmod 3 жыл бұрын
Very good information
@DatabaseStar
@DatabaseStar 3 жыл бұрын
Thanks!
@mostafa2199
@mostafa2199 2 жыл бұрын
thanks it really helped
@DatabaseStar
@DatabaseStar 2 жыл бұрын
Glad it helped!
@夜逃雨
@夜逃雨 8 ай бұрын
thank you.
@DatabaseStar
@DatabaseStar 8 ай бұрын
You're welcome
@swan_oahu
@swan_oahu Жыл бұрын
Thank you 👍
@DatabaseStar
@DatabaseStar Жыл бұрын
No worries!
@vaylx2253
@vaylx2253 2 жыл бұрын
Thanks for that.
@DatabaseStar
@DatabaseStar 2 жыл бұрын
Glad it was helpful!
@mikkii3989
@mikkii3989 Жыл бұрын
I honestly gonna die with this language :")
@DatabaseStar
@DatabaseStar Жыл бұрын
Hahah
@hfghffggjngyh4754
@hfghffggjngyh4754 3 ай бұрын
thax
@DatabaseStar
@DatabaseStar 2 ай бұрын
You're welcome
@emekatimothyiloba699
@emekatimothyiloba699 Жыл бұрын
Thanks
@DatabaseStar
@DatabaseStar Жыл бұрын
No problem!
@Entertainmentmod
@Entertainmentmod 3 жыл бұрын
Can you t sql vedios
@DatabaseStar
@DatabaseStar 3 жыл бұрын
Sure I can make TSQL videos.
@finnnelson5472
@finnnelson5472 2 жыл бұрын
🙌
@DatabaseStar
@DatabaseStar 2 жыл бұрын
Thanks!
MySQL: GROUP BY
5:08
Bro Code
Рет қаралды 64 М.
Family Love #funny #sigma
00:16
CRAZY GREAPA
Рет қаралды 60 МЛН
Trick-or-Treating in a Rush. Part 2
00:37
Daniel LaBelle
Рет қаралды 46 МЛН
1, 2, 3, 4, 5, 6, 7, 8, 9 🙈⚽️
00:46
Celine Dept
Рет қаралды 104 МЛН
7 Mistakes Beginners Make with SQL
10:47
Database Star
Рет қаралды 20 М.
When to Use a Subquery in SQL
8:50
Database Star
Рет қаралды 36 М.
SQL Indexes - Definition, Examples, and Tips
12:14
Database Star
Рет қаралды 81 М.
you need to learn SQL RIGHT NOW!! (SQL Tutorial for Beginners)
24:25
NetworkChuck
Рет қаралды 1,6 МЛН
SQL CTEs (Common Table Expressions) - Why and How to Use Them
7:56
Database Star
Рет қаралды 34 М.
Family Love #funny #sigma
00:16
CRAZY GREAPA
Рет қаралды 60 МЛН