Tuesday, 9 June 2020

sum

how to find the sum of column
select sum(age) from database2.studentifno;
age row sum
some number it will display
how to find the average of that column
select avg(age) from database.table;
average of that column
how to find the maximum of that row
max(age)
how to find the minimum value in that column
min(age)



Counting all of the Rows in a Table

To counts all of the rows in a table, whether they contain NULL values or not, use COUNT(*). That form of the COUNT() function basically returns the number of rows in a result set returned by a SELECT statement.
SELECT COUNT(*) FROM cities;

how to do sum of sepecifi column


how to average of specific column

how to find the max digit in that column

how to find the minimum digit in that column


select sum 
select avg
select max
select min

No comments:

Post a Comment