SQL For Beginners: SQL Guide to understand how to work with a Data Base by Mastery White Belt

SQL For Beginners: SQL Guide to understand how to work with a Data Base by Mastery White Belt

Author:Mastery, White Belt [Mastery, White Belt]
Language: eng
Format: epub
Published: 2020-10-08T00:00:00+00:00


Script 2:

SELECT TOP(1) Price AS [Minimum Share Price] FROM Shares ORDER BY Price;

Output:

MAX

The MAX function finds the maximum value of a column that is having numerical data.

Syntax:

SELECT MAX(Column1) FROM Table1

The following scrips find the maximum share price.

Script 1:

SELECT MAX(Price) AS [Maximum Share Price] FROM Shares;

Script 2:

SELECT TOP(1) Price AS [Maximum Share Price] FROM Shares ORDER BY Price DESC;

Output:

➔ TOP(1) can be used to find a maximum and minimum value of a column.

AVG

The AVG function calculates the average value of a column that is having numerical data.

Syntax:

SELECT AVG(Column1) FROM Table1

The following scrips find the average share quantity.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.