Syntax:-
SELECT AVG(column_name) FROM table_name
In this article, we are going to use the following table for some examples:-
CREATE TABLE [dbo]. [Employee](
[Empid] [Int] IDENTITY (1, 1) NOT NULL Primary key,
[EmpNumber] [nvarchar](50) NOT NULL,
[EmpFirstName] [nvarchar](150) NOT NULL,
[EmpLAStName] [nvarchar](150) NULL,
[EmpEmail] [nvarchar](150) NULL,
[Salary] [int] NULL
)
We insert following data into the above tables:-
Insert Into Employee (EmpNumber,EmpFirstName,EmpLAStName,EmpEmail,salary)
Values(‘A001′,’Vivek’,’Johari’,’samir@abcmail.com’,200000)
Insert Into Employee (EmpNumber,EmpFirstName,EmpLAStName,EmpEmail,salary)
Values(‘A002′,’Amit’,’Kumar’,’amit@abcmail.com’,100000)
Insert Into Employee (EmpNumber,EmpFirstName,EmpLAStName,EmpEmail,salary)
Values(‘A003′,’Neha’,’Sharma’,’neha@abcmail.com’,300000)
Insert Into Employee (EmpNumber,EmpFirstName,EmpLAStName,EmpEmail,salary)
Values(‘A004′,’Chandra’,’Singh’,’vivek@abcmail.com’,320000)
Insert Into Employee (EmpNumber,EmpFirstName,EmpLAStName,EmpEmail,salary)
Values(‘A005′,’Avinash’, ‘Dubey’,’avinash@abcmail.com’,250000)
For example,
Select AVG(salary) from employee
will give the given result:-
234000
Pingback: hi-lo,ไฮโลออนไลน์,สูงต่ำ
Pingback: 바카라
Pingback: google analytics wordpress
Pingback: 온라인카지노
Pingback: How to watch Rugby World Cup 2019 live stream online instantly
Pingback: https://www.wasseem.org/
Pingback: https://www.hokybos.com
Pingback: Accountant in Tampa FL
Pingback: official website
Pingback: ประยุทธ์ จันทร์โอชา
Pingback: New build Property Investment Alicante
Pingback: Lexus Near Greensboro NC
Pingback: http://altto.pl/gazeta-wyborcza-plock-192-2013-998.php
Pingback: w88.com - a-thể thao
Pingback: Pre-Market Stocks Gold Silver Update Today New Futures Exchange for Gold
Pingback: slotjackpot168
Pingback: Drogen kaufen
Pingback: ebenin amini türkce dublaj izle
Pingback: Industry Report
Pingback: w88 world
Pingback: cdr qq
Pingback: fifia55
Pingback: ufabet
Pingback: mejaqq
Pingback: iPhone XR Screen Replacement for LCD Digitizer Amazon Best Seller
Pingback: Sydney
Pingback: car window signs
Pingback: agen qiuqiu99
Pingback: https://www.klikdokter.com/