Grokking SQL for Tech Interviews
Ask Author
Back to course home

0% completed

Aggregate Functions
Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

MySQL provides several aggregate functions that allow you to perform calculations on sets of data within a table. These functions are often used in conjunction with the GROUP BY clause to operate on groups of rows.

Here's a breakdown of some commonly used aggregate functions:

1. COUNT()

The COUNT() function is used to count the number of rows in a set, satisfying a given condition.

Syntax:

SELECT COUNT(student_id) FROM students;

This query gives the total count of student in the student table.

2. SUM()

The `SUM()

.....

.....

.....

Like the course? Get enrolled and start learning!

Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible