HomeОбразованиеRelated VideosMore From: Joes2Pros SQL Trainings

SQL Aggregation queries using Group By, Sum, Count and Having

575 ratings | 165807 views
From SQL Queries Joes 2 Pros (Vol2) ch4.1. Learn up to write aggregated queries.
Html code for embedding videos on your blog
Text Comments (28)
alrishane lopez (14 days ago)
Akshay Gupta (1 month ago)
Kevin Clarke (5 months ago)
Great tutorial, stressing key concepts without giving too much detail. As an experienced SQL writer who has always struggled with aggregation queries, I especially appreciate the parts about counting values vs counting records (explains why my results sometimes didn't make sense) and the rules for deciding which fields to include in SELECT, GROUP BY and aggregation lists. Lots of practice to follow!
No Name (6 months ago)
Your voice uuuggh... but nice tut. Boy
Leo Nard (8 months ago)
thanks, really helpful for my job! ;)
Stanislav Vain (8 months ago)
Thanks! It's very useful
Poy Poy (9 months ago)
need help. for example, i have a total of 50 studentcapacity in a section or a room, and there are only 2 students in a room, how can i get the vacant? or total of vacant
Meenal Yengul (1 year ago)
what if we want to get max number of occurrences ?
Junaid Tanoli (1 year ago)
Your voice is like Mr. Chow from Hangover :D , BTW nice tutorials.
Ruel SISCO (1 year ago)
can you please show a video sample the record count value to be display in the textbox every time i click the record in the gridview using asp.net
Gogleinski Suksinski (1 year ago)
Why don't you get errors when you don't have all your select items in the Group By. In SQL 2012 I get errors when following your example.
Jeezy M. (1 year ago)
The reason why is because the second select field is an aggregate with SUM. You don't have to list that field under group by.
Srikanth Shenoy (2 years ago)
Awesome.. Got exactly what i was looking for!!!! Domo Arigato
Imran Shaikh (2 years ago)
Thanks sir..Really it is helpful for me...
Muhammad Aamir (2 years ago)
Hello Sir!i am facing a little bit problem in SQL.I want to add only five subjects for a single student.means there should be only five rows a for each ID..how i will add restriction on an ID,which should not add more than five subjects a student. I shall be thankful to you. Thanks in Advance
Aris Hambardzumian (2 years ago)
Thanks! It was very helpful!
Wei Lai (3 years ago)
this is great, thank you
FlareSoul69 (3 years ago)
This tutorial is absolutely fantastic... because in the real world application at your job... this deeper understanding of what it looks like just simple concepts will tremendously make your life easier when it comes to troubleshooting why your results set or rows count aren't aligning.
Marc-Étienne Paradis (4 years ago)
anis mizi (4 years ago)
Great tutorial.Learnt everything you discussed in this video.Thanks
Arjun singh (4 years ago)
it's so helpful i like it
Brandon Gow (5 years ago)
o god... this helped so much
Unstoppablebird (5 years ago)
thanks a lot!
David Gega (6 years ago)
GREAT STUFF! Very helpful
ZhongMing Ding (7 years ago)
This is helpful
Thank you!
Michael Mittermayr (5 months ago)
Great videos! What tool are you using for recording?
plsea tell me about this query select name,date,sum(totle) from table where name='ali' group by name,date this not give sum as sum should be please tell me why

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.