get average value form table

Total Post:145


 1721  View(s)
Rate this:

Hi Everyone!

I have a table (tblEmployee) as per bellow

ID Name  Salary
-- -----  ------
1 Mark   15000
2 Samuel  20000
3 Ethon  26000
4 Gotibandhu 15000

I want to select table data based on average value of column

e.g. average of table is

2 Samuel  20000

Thank in advance!

  1. Re: get average value form table

    Hi Ezra!

    You can get table data using nested query or sub query, as following

    select * from [tblEmployee] where [salary] = (select avg(salary) from [tblEmployee])


Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.