GROUP BY Extensions in MySQL

Do you want to perform multiple groupings in one query? Learn how to use GROUP BY extensions, such as ROLLUP in MySQL. Take the next step towards being a SQL expert!

Table of contents

10 free interactive coding challenges

Lifetime access


limited to this course only


Buy now

Want a better deal?


Get unlimited lifetime access to all 68 present and future courses

Save $450

Unlimited lifetime access


to all 68 present and future courses



75% OFF

Buy now

Interactive exercises

7 h

Estimated time


Users enrolled


149 ratings

Do you already know the basics of SQL? Then It’s time to learn some of its advanced features! In this online MySQL course, you’ll learn how to use the GROUP BY extensions. This includes WITH ROLLUP, which allows you to do multiple groupings with one query. If you are serious about a career in data analytics, business development, or anything that requires data analysis, you should know about these features.

WITH ROLLUP is a super-handy extension of the GROUP BY clause. It allows you to attach additional lines which represent subtotals. They are often called super-aggregated rows, and they can be presented together with the total sum line. Thanks to this, you can generate multiple grouping sets using just one SQL query.

This online MySQL course is intended for intermediate SQL users. If you are new to MySQL, take SQL Basics in MySQL first and come back here for more.

GROUP BY Extensions in MySQL is interactive. Everything happens in the online console. You practice by writing real SQL code and solving exercises directly in your web browser. Our online platform runs your code and verifies your solution. You don't need to install any software on your computer.

This course uses MySQL 8. However, anyone working with MySQL 5 and earlier can also take the course; we clearly indicate which GROUP BY extension features are only available in MySQL 8.

What Do You Need to Take This Course?

  • A web browser.
  • An internet connection.
  • Basic knowledge of MySQL and some SQL practice.

This Course Will Teach You How To:

  • Use ROLLUP with GROUP BY in MySQL
  • Use GROUPING() and COALESCE() in MySQL
  • Use new functions and multiple groupings with UNION ALL in MySQL

Who Should Take This Course?

  • Analysts who create reports in MySQL
  • Students taking courses in MySQL
  • Programmers who work with MySQL and want to improve their skills
  • Anyone who knows basic SQL and wants to learn more

What's in It for Me?

  • 27 interactive exercises. Learn at your own pace, from anywhere and at any time. Interactive, hands-on learning improves retention.
  • Lifetime access to the course. When you purchase the course, you’ll get instant personal access to all of its content.
  • Certificate of completion. After you successfully finish all of the exercises, you’ll get a downloadable PDF certificate to showcase your accomplishment.
  • 30-day money-back guarantee. If you’re not satisfied with the quality of the course, you can get a refund within 30 days of your purchase.
  • Hints and help. There are hints available in the exercises to help you if you get stuck. You can also ask our learning community for help through the Disqus tab. Or drop the course creators a line – we’ll be more than happy to answer! 😉

Table of contents


Paid content


Course progress


Exercises completed



Learn how to use ROLLUP with GROUP BY.



GROUP BY – Recap




Final Quiz

Verify how much you've learned with us in this course.




The End

Reviews (0)

Average rating



149 ratings


5 stars


4 stars


3 stars


2 stars


1 stars