Aggregate functions in SQL
SUM(): Sum of values
COUNT(): number of values
MAX(): maximum value
MIN(): minimum value
AVG(): average value
When using aggregate functions, you have to group your query by the remaining fields in the SELECT statement using GROUP BY.
When filtering an aggregate function, use HAVING instead of WHERE
Formula 1 Data: https://ergast.com/mrd/db/#csv
#sql #aggregate #group #functions #databases #max #min #avg #count #sum