The COUNT operator is usually used in combination with a GROUP BY clause. It is one of the SQL "aggregate" functions, which include AVG (average) and SUM.
This function will count the number of rows and return that count as a column in the result set.
Here are examples of what you would use COUNT for:
* Counting all rows in a table (no group by required)
* Counting the totals of subsets of data (requires a Group By section of the statement)
For reference, here is the current data for all the rows in our example student database.
```sql
select studentID, FullName, programOfStudy, sat_score from student; -- all records with fields of interest
Here is an example using the campaign funds table. This is a sum total of the dollars in each transaction and the number of contributions for each political party during the 2016 US Presidential Campaign.
```sql
select Specific_Party, Election_Year, format(sum(Total_$),2) AS contribution$Total, count(*) AS numberOfContributions