How to Get Max and Min values from a Table by using Aggregate Function - TSQL Tutorial Part 129

preview_player
Показать описание
SQL Server / T-SQL Tutorial Scenario:
How to use Max and Min Aggregate Functions in SQL Server?

Scenario:
Let's say you are working as SQL Server Developer, you have dbo.Customer table with SaleAmount. You are asked to write a query that should return Max SaleAmount and Min SaleAmount from the dbo.Customer table.

Solution:
You can use Max and Min aggregate functions in SQL Server to find the Maximum and Minimum values.

Let's create dbo.Customer Table with sample data so we can use Max and Min functions.

Link to scripts used in SQL Server / TSQL Tutorial Video

Check out our website for Different SQL Server, MSBI tutorials and interview questions
such as SQL Server Reporting Services(SSRS) Tutorial
SQL Server Integration Services(SSIS) Tutorial
SQL Server DBA Tutorial
SQL Server 2016 DBA Tutorial
SQL Server / TSQL Tutorial ( Beginner to Advance)
Рекомендации по теме
Комментарии
Автор

I need min and Max values like Min(a) and Max(kingmaharaja) this, if any one knows the please let me know

manum