Agregate functions in SQL
Aggregating functions is used to find values out of our data in SQL. Say for example if we have a books database we can group our data by authors then find out how many total books an author has written by aggregating that query. There are many different aggregating functions in SQL but the ones I am going to focus on today are COUNT, AVG, and MIN. The COUNT function allows you to count the total number of data in a specific row after we group our data. For example in the screenshot I attached we are using the books table. We are gathering all the first names and last names from the table. Once we do that we group by author first name that way any authors that have the same first name in our table. Once we do that we call the function COUNT(*) to count the number of duplicates in that row. That would give us the total number of books that specific author has written based off our database. The next function is AVG. This allows you to get the AVG of data that you group by