Mean is the average of the given data set calculated by dividing the total sum by the number of values in data set.
Input: 1, 2, 3, 4, 5 Output: 3 Explanation: sum = 1 + 2 + 3 + 4 + 5 = 15 number of values = 5 mean = 15 / 5 = 3
Query to find mean in the table
SELECT Avg(Column_Name) FROM Table_Name
Query to find Mean:
Mode of a data set is the value that appears most frequently in a series of data.
Input: 1, 2, 2, 3, 4, 4, 4, 5, 5, 6 Output: 4 Explanation: 2 occurs 2 times, 5 occurs 2 times 4 occurs 3 times and rest other occurs 1 time So, 4 occurs most frequently and is thus the output.
Query to find mode in the table
SELECT TOP 1 Column_Name FROM Table_name GROUP BY [Column_Name] ORDER BY COUNT(*) DESC
Query to find Mode:
- Difference between Structured Query Language (SQL) and Transact-SQL (T-SQL)
- Copy tables between databases in SQL Server using Import-and-Export Wizard
- Difference between MySQL and MS SQL Server
- Difference between Couchbase and MS SQL Server
- Create, Alter and Drop schema in MS SQL Server
- Difference between MS SQL Server and CouchDB
- Difference between MS SQL Server and IBM DB2
- Difference between Redis and MS SQL Server
- Full join and Inner join in MS SQL Server
- Left join and Right join in MS SQL Server
- Difference between Neo4j and MS SQL Server
- Self Join and Cross Join in MS SQL Server
- Union and Union All in MS SQL Server
- SIN() and COS() Function in SQL Server
- varchar, varchar(max) and nvarchar in MS SQL Server
- text, ntext, binary, varbinary and varbinary(max) in MS SQL Server
- Difference between char and nchar : MS SQL Server Datatypes
- Numeric and Date-time data types in SQL Server
- Deterministic and Nondeterministic Functions in SQL Server
- Select into and temporary tables in MS SQL Server
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.