Advanced Aggregate Functions in SQL (GROUP BY, HAVING vs. WHERE)
HTML-код
- Опубликовано: 6 янв 2020
- In this step-by-step video tutorial, you will learn some more advanced SQL aggregation concepts by using the GROUP BY, HAVING, and WHERE clauses!
Learn about the BASIC aggregation Functions: • Basic Aggregate Functi...
Queries:
1) Pull aggregate information with the GROUP BY clause: SELECT column1, column2, COUNT(column3) FROM table GROUP BY column1, column2
2) Use the HAVING clause to filter your aggregation: SELECT column1, COUNT(column2) FROM table GROUP BY column1 HAVING COUNT(column2) = 5
3) Use WHERE and HAVING clauses in the same query: SELECT column1, COUNT(column2) FROM table WHERE column1 = 3 GROUP BY column1 HAVING COUNT(column2) = 5
Get the Northwind Database: • How to Load a Sample P...
Support the Channel:
1) Subscribe: www.becomingads.com/o/youtube
2) DataCamp:
3) Udacity: - Наука
You taught me in 6 minutes what my university class failed to teach me in 2 weeks lol
Subscribed ❤️
Or even years, online education is amazing, the future of universities is a political issue but most of education should move to the digital environment in my opinion of course, I’m from Mexico y went to the university but i am updating my stack with platzi, the biggest platform to learn digital stuff, marketing, dev, data science, in Spanish is like udemy but even better and i love it
3 minutes in 2X speed
Same for me
Well you know what an unsigned byte address looks like after packing.
@@lauraaparicio3076 I agree with you!
Thanks for clarifying that WHERE cannot be used on aggregations. This is exactly what I was looking for regarding WHERE vs. HAVING. Not sure why I haven't seen this mentioned elsewhere, subscribed!
Was looking for the same
I dont get why it cant be used, in their documentatoin they also say u cant use them, but then they go on to provide examples like
SELECT city, count(*) FILTER (WHERE temp_lo < 45), max(temp_lo)
FROM weather
GROUP BY city; which are combing both
@@markkoech289ditto 😊
These are amazing tutorials. Keep up the great work!
I'm so happy to finally found someone able to explain HAVING so easily. Thank you so much man
Thank you, I've spent a week trying to make it all make sense.
You've just done that!
Thank you Nathan. So nicely explained in such a seemingly effortless way! Please keep up the great work as you might just keep me sane.
Finally understanding how GROUP BY & HAVING work, this was definitely helpful.
This is easier to understand than what my online mentor taught me. Thank you!
Thank you for your concise delivery. Not too slow nor fast.
Your SQL video was exactly what I needed. Thank you for explaining it so clearly. 😄🎬💻🔍
This was very helpful!! Cleared up a lot of confusion I am having in my undergrad database class. Clutch for my exam tomorrow! :)
Thank you so MUCH! I just loved the way you explained everything in this short video it helped me to understand very well. Please keep making short videos!
Straight to the point without any BS.. You are my hero
This is SOOO much clearer than what my instructor teaches at NAIT. Excellent tutorials.
This answered all my questions while doing the google data analytics certificate. Thanks for taking the time to do this.
That was the most helpful explanation. I kept having the trouble of understanding when and how to use these two.
for two years I've been struggling to understand how and when to use these clauses and you just taught me all that in 6 minutes. You are a legend. Thank you. It is going to save me from a lot of trouble from my Uni exam next week
learning relational database in university, this video helped a lot. thanks man!
One of the best video outhere. It really helped me out to understand what's the use of GROUP BY
THANK YOU
Thank you making such a great informational, informative, simplified video to teach us individuals who are willing to learn all of these topics discussed.
Just subscribed. If you ever get tired of BEING a data scientist, you should definitely go into teaching. You've got a knack for making complex things simple.
You are a legend, this guy saved my life In university. :D
Super simple, easy to follow! Thank you for uploading!
Thank you so much! I have my exam tomorrow and was always confused about when i can use what. No one could explain it to me and it took you 5 minutes lol your‘re a life saver
I was lost reading through Microsoft SQL pages on HAVING vs WHERE, but with this video I got it right away😀 Thank you ❤
Thank you for sorting this out so clearly!
You helped me a lot, i had a lot of issue with having and group by. Thank you
Thanks sir, it just take me 6 mins to watch but it's completely comprehensive. Amazing turorials, thanks for clarifying my confusion.
I've been struggling with a problem like this all day. Thank you!
Thank you! You made it so easy to understand. Much appreciated
Great job Nathan so explicit
Many thanks for this very short and crisp information. Thank you!!
A 6-minute watch saves me from a lengthy 2-hour lecture, not to mention the lecture didn't even serve its purpose of teaching us in such intuitive explanation ❤️
This is a life savior!! Thank you THANK YOU!!!!!
Thank you so much. This is the video I was looking for! 🙌
Very concise and clear! Thank you so much
The clarity here is amazing
Thanks! Very helpful for my interview preparation recap.
Man I love your content! you're a savior! thanks for the educational videos!!
Best example i found so far, thank you!
You teach like an real expert.
Man your explanation is amazing. Ill check all of your's videos. Thank you a lot
Nice job. Thanks! Very useful and to the point. None of the stupid music or crazy intros!
Oh my gosh! You answered the question that was stumping me the last few days. I’m taking the google analytics course and I keep having errors with my aggregate functions. When you added city to the SELECT clause, I keep doing that with the data set I’m working on and keep getting an error message. Then I saw you added country and city under GROUP BY which I have never done before so I think your video was the answer to my question. Thank you!!!
Superb video. Straight to the point and very concise 👍🏾
I love the tempo of this video. Thanks.
it is a 100% useful and effective tutorial. I really thank you so much.
great instructions man. I'm you can explain in great details in English I can fully understand cause a bunch of the tutorials I find is mostly from people in India and I just can't understand some the words they are saying. GREAT LESSONS AND VIDEOS IN DETAIL! GREAT INSTRUCTOR. Remember it takes 3 to 10 years to become a overnight success.
You are a lifesaver! Thank you!
Second video of yours I watch. You have such a great way of explaining things! Subscribed
great & simple explanations- thank you!
Thank you for the quick tutorial!
This was incredibly helpful. Thank you!
thank man, this really helped clarify these concepts
Simple and concise. Thank you so much
You're the best. Much love from Miami U.
Now it is clear. Thanks for posting this video.
great job very straight and clear tutorial, thank you
Thanks! Very useful how to use Having instead of 'where' , helped me count a column then use a condition to check the count greater then a value.
Very easily explained! Big thanks!!
Best explanation I have come across. Thanks
Such a simple and powerful explanation video
it helped alot thank you for short and clear explnation
FANTASTIC! Thank you!!!!
Just found this video and it's really helpful
Thank you! This was great help!!!
Thank you, well explained! Subscribed!
Great video! Very helpful and made a ton of sense! Thanks!!
Your video is great! Helps me a lot!!!
Very helpful. Thank you!
Thank you. This is so helpful.
short and helpful. Thank you.
Clear and concise! Great and very informative videos!
i love how this guy in 6 minutes managed to explain GROUP BY and HAVING whilst i've been struggling with them for the whole semester
clear and easy to understand !
It couldn't be clearer. Thank you!
Good Video, explained it very well, I was stuck with the silliest problem and because of the way you explained it I sorted the issue! Top Video my friend!
Great video, thanks!
Oh my god, you helped me so much I spent all day on this and you helped me more than the damn instructor did. Thank you so much.
Thank you. It helps me so much.
THANK YOU!! I sorted easily
Thank you so much you are a GREAT teacher! :)
This was really helpful, thank you!!!!
Thx it really helped me understand the HAVING and WHERE Statement
im so happy I found this video!!😆
Great explanation. Thank you so much...
You are an amazing teacher
Very helpful, you are a great teacher!!
Thank you so much. Really helpful!
This is super helpful. Thank you.
This was very helpful and well explained. Thanks
Great explanation, thanks!
nice content, easy to understand.
THX
this was really helpful watched this after getting a hacker rank question where I had to stack overflow too much.
Brilliant vid man , thnaks a ton
I learned everything I needed to know !
... thanks man, you just made my life easier 👌
Thank you for this!!!
Great Job, thanks for sharing Knowledge.
Thanks for the video and your examples, you can really explain it in simple words, nice work :)))))