---
title: "get average value form table"  
description: "get average value form table"  
author: "Anonymous User"  
published: 2013-03-11  
updated: 2013-03-11  
canonical: https://www.mindstick.com/forum/648/get-average-value-form-table  
category: "mssql server"  
tags: ["mssql server"]  
reading_time: 1 minute  

---

# get average value form table

Hi Everyone!

I have a table (tblEmployee) as per bellow

ID [Name](https://yourviews.mindstick.com/view/87450/how-to-generate-a-brand-name-using-linkedin-comprehensive-guide) Salary\
-- ----- ------\
1 Mark 15000\
2 Samuel 20000\
3 Ethon 26000\
4 Gotibandhu 15000

I want to [select](https://www.mindstick.com/forum/160534/orderby-then-select-vs-select-then-orderby-performance) [table data](https://answers.mindstick.com/qa/114525/how-to-delete-rows-with-reference-table-data) based on average [value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages) of [column](https://www.mindstick.com/forum/33860/how-to-calculate-column-summary-in-sql-server)

e.g. average of table is

2 Samuel 20000

Thank in [advance](https://www.mindstick.com/blog/33258/jee-mains-and-jee-advance-exams)!

## Replies

### Reply by AVADHESH PATEL

Hi Ezra!\
You can get [table](https://www.mindstick.com/articles/43918/how-to-design-table-using-bootstrap) [data](https://www.mindstick.com/articles/13050/salesforce-aiming-to-dominate-predictive-analytics-with-data-science) using nested query or sub query, as following\
select * from [tblEmployee] where [salary] = (select avg(salary) from [tblEmployee])


---

Original Source: https://www.mindstick.com/forum/648/get-average-value-form-table

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
