Course Content

  • Tuple


The aggregate function used with the GROUP BY clause is known as the Having Clause. With aggregate functions, the HAVING clause is utilised instead of the WHERE clause. The GROUP BY Clause, on the other hand, groups rows with the same values into summary rows.

You don't need to utilise an aggregate function if you employ the GROUP BY clause. The query below extracts information from the payment table and groups the results by customer id. The GROUP BY clause acts similarly to the DISTINCT clause in this case, removing duplicate rows from the result set.

An aggregate function, also known as an aggregation function, is a database management function that groups the values of numerous rows into a single summary value. Average (i.e., arithmetic mean) and Count are two common aggregate functions.

Only distinct (different) results are returned using the SELECT DISTINCT command. A column in a table frequently has multiple duplicate values, and you may only wish to list the difference (distinct) values.

The DISTINCT clause in MySQL can be used to return a single column that eliminates duplicates from the result set. Consider the following scenario: SELECT DISTINCT state FROM customers; In this MySQL DISTINCT example, the customers table would return all unique state values.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere