Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
0 Let us look at the sum function 1
Sum function as you can guess 2
Returns the sum value or the aggregate value of the expression that you have given it as an input 3
The syntax for sum function is select 4
Sum mention the column name 5
Then you can give additional column names if you want to 6
From table name 7
Then you can give conditions 8
Specify condition using the where statement 9
If you want to 10
Let us look at some example 11
Suppose you want to find out the total profit you have earned 12
So if you go to the sales table 13
There is a separate column named 14
Profit 15
I want to get the total sum of all the profit values 16
How to do that 17
Select sum 18
Of the profit column 19
As total profit this is the alias I am providing to this column 20
From sales table 21
Let us go and write this 22
Now I will write the sum Query 23
Query 24
Select 25
Sum 26
The profit column so profit 27
Name this column as total profit 28
And I'll mention the table name from sales 29
The query has return the result, the total profit 30
I have earned is 31
nearly 286,000 32
Not let us look at 33
Using the sum function along with a specified condition that is using where 34
If I want to find out 35
What is the total quantity of a particular product that I have sold 36
To find that out, I will write select sum of quantity 37
As total quantity 38
From 39
Orders where product ID is this particular product ID, so how many of this particular product 40
I have sold 41
Let us go and find out 42
Select sum 43
Of quantity 44
As total quantity 45
From tablename where 46
Product ID 47
This one 48
So 49
The total quantity of this particular product ID sold is 29 50
So that is how sum function is used, to find out aggregate or totals 51
Next we'll look at how to use 52
Average functions
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.