Saraswat World Changed status to publish June 14, 2023
COUNT()ย function returns the number of rows that matches a specified condition.
Syntax โ
SELECTย COUNT(ColumnName)
FROMย <TableName>
WHERE<condition> ;
Example-
SELECTย Count(ProductID)
FROMย Products;
AVG()ย function returns the average value of a numeric column.
Syntax โ
SELECTย AVG(ColumnName)
FROMย <TableName>
WHERE<condition> ;
Example-
SELECTย AVG(Price)
FROMย Products;
SUM()ย function returns the sum value of a numeric column.
Syntax โ
SELECTย SUM(ColumnName)
FROMย <TableName>
WHERE<condition> ;
Example-
SELECTย SUM(Quantity)
FROMย OrderDetails;
Note-
Northwind sample database is used for examples.
Saraswat World Changed status to publish June 14, 2023
Leave a Reply