This tutorial is about aggregate functions such as COUNT, SUM and AVG. An aggregate function takes many values and delivers just one value. For example the function SUM would aggregate the values 2, 4 ...
COUNT_BIG(*) returns the number of items in a group. This includes NULL values and duplicates. COUNT_BIG (ALL expression) evaluates expression for each row in a group, and returns the number of ...