Sum sql

This article is tagged with: Sum sql and mysql

sum sql

SELECT SUM(column_name)
FROM table_name
WHERE condition;

sql count

/* COUNT() is a function that takes on the name of a clomn as an argument
and counts the number of rows where the column is not null */
SELECT COUNT(column_name)
FROM table_name;

how to find averages on sql

SELECT AVG(column_name)
FROM table_name
WHERE condition;

sum of column in sql

SELECT SUM(column_name)
FROM table_name
WHERE condition;

select count sql

SELECT COUNT(column_name)
FROM table_name
WHERE condition;

This article is tagged with: Sum sql and mysql