Basic Aggregate Functions in SQL (COUNT, SUM, AVG, MAX, and MIN)

preview_player
Показать описание
Learn how to use SQL's basic aggregation functions like COUNT, SUM, AVG, MAX, and MIN in this step-by-step tutorial!

Queries:
1) Get a count of all the rows: SELECT COUNT(*) FROM table
2) Get a SUM of a column in all the rows: SELECT SUM(column1) FROM table
3) Get the maxium number in a column: SELECT MAX(column1) FROM table
4) Get the minimum number in a column: SELECT MIN(column1) FROM table
5) You can also do arithmatic with these aggregate functions: SELECT MAX(column1)-MIN(column1) AS range FROM table
6) Or, like this: SELECT AVG(column1*column2) FROM table

Support the Channel:
Рекомендации по теме
Комментарии
Автор

You may not see this, but this video has helped me tremendously. Aggregate functions drove me crazy until I watched this video. Now I have a better foundation and feel a lot more confident with this topic now.✊🏽🔥🔥

RDD_TTV
Автор

You are single-handedly saving my grade and finals preparation for my databases module. I appreciate all the hard work, thanks a ton!

mang
Автор

Clear and concise! Thank you! Really cool video!

enriqueperez
Автор

Great content, your introduction of the topic got me going pretty quick

jayreigning
Автор

great video brotha, really helping me out studying!!!

maxficcardi
Автор

Thank you. Really helpful! I'm binge watching haha

juliakristavilladiego
Автор

Glad I found your channel. Happy learning and thanks for sharing ur knowledge

gintomino
Автор

Thank you for this! Currrently studying SQL on my weekends! <3

michealangelodelacruz
Автор

my teacher explained and i could not understand anything and i watched your video and understood everything, i appreciate you and your channel so much, thank you !!!!

aaronmubiru
Автор

Very helpful video, thank you so much!

olgakwoczak
Автор

Great videos!! how would you exclude an item from a total? example, total quantity excluding beer.

angelandradeolvera
Автор

Done thanks
Simple aggregate functions like max min etc
Where clause is applied first, then aggregate functions applied to what that where clause has filtered

mostinho
Автор

Great vid, it makes more since now. Thx

wholesalingtony
Автор

I love you dude your so good at explaining and teaching man

crosselen
Автор

So helpful and so Would you want to teach us about leetcode as well???? haha thank you for your hard work.

maywu
Автор

How do you put the total of a column into all the cells of another column?

GrumpyOldMan
Автор

I cant help feeling nervous seeing the sales funnel book on the shelf. I am about to end up buying a weekend workshop and mentor?

nizwudg
Автор

i don't know if you've answered this in any of your videos but are you actually going to be SELECT * on a massive database? is there a query that can show you how many rows / columns you have so you don't crash your system? or can you do a query that shows column names and how many rows?

VeronicaAngryPolak