Course

Advanced

GROUP BY Extensions in SQL

Do you want to work more efficiently using SQL and be able to create more complex and sophisticated queries? Learn about GROUP BY clauses, such as ROLLUP, CUBE, and GROUPING SETS.

Table of contents

10 free interactive coding challenges

Lifetime access

B042DDD8-A1C9-4053-8AF3-463EB31543B8@2x

limited to this course only

$39

Buy now

Want a better deal?

B042DDD8-A1C9-4053-8AF3-463EB31543B8@2x

Get unlimited lifetime access to all 69 present and future courses

Save $450

Unlimited lifetime access

B042DDD8-A1C9-4053-8AF3-463EB31543B8@2x

to all 69 present and future courses

$149

$599

75% OFF

Buy now
Details
63

Interactive exercises

7 h

Estimated time

11691

Users enrolled

☆☆☆☆☆
★★★★★

1964 ratings

This online course is intended for intermediate users and benefits beginner data analysts, IT students, business developers, and more. The prerequisite is understanding the basics of SQL presented in our SQL Basics course, followed by some practice.

Building blocks of a GROUP BY table

Do you already know the basics of SQL? It’s time to learn some of its advanced features! In this online course, you’ll learn how to use ROLLUP, CUBE, and GROUPING SETS operations.

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

Similar to ROLLUP, the CUBE extension allows you to generate subtotals. In addition, CUBE generates subtotals for all combinations of grouping columns specified in the GROUP BY clause.

GROUPING SETS is another step further because it allows for computing multiple GROUP BY clauses in a single SQL statement. GROUP BY GROUPING SETS is equivalent to the UNION of two or more GROUP BY operations in the same result set.

This online course consists of interactive exercises so that you can immediately gain practical experience. We designed it with the thought that it’s best to acquire knowledge through action. You can study at your own pace, and all you need is a computer, an internet connection, and a desire to learn and grow!

So what’s it going to be?

What's in It for Me?

  • 63 interactive exercises. Interact with hands-on exercises for improved retention. Learn at your own pace, from anywhere and at any time.
  • Lifetime access to the course. When you purchase the course, you'll get instant personal access to all of its content.
  • Online certification. Complete all of the exercises successfully and you'll get a certificate. You can publish the certificate on your LinkedIn profile (here's how).
  • 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 for the exercises. You can make use of ready-made hints for the exercises or ask questions and share insights with other members of our community through the Discuss tab.

Learn How To:

  • Use ROLLUP with GROUP BY.
  • Display the order of columns with CUBE, and use CUBE with GROUPING() and COALESCE().
  • Use new functions and multiple groupings with UNION ALL.
  • Use multiple groupings with GROUPING SETS.

What Do You Need to Take This Course?

Who Should Take This Course?

  • Anyone who knows basic SQL but wants to go a step further.
  • Analysts who use SQL to create reports.
  • Database administrators.
  • Students taking SQL courses.
  • Programmers looking to improve their SQL skills.

Table of contents

Free

Paid content

0%

Course progress

0/63

Exercises completed

1.

ROLLUP

Learn how to use ROLLUP with GROUP BY.

0/21

Introduction

GROUP BY – Recap

ROLLUP

Summary

2.

CUBE

Discover CUBE, another GROUP BY extension.

0/17

Introduction

CUBE

Summary

3.

GROUPING SETS

Let's take a close look at GROUPING SETS, the last GROUP BY extension in our course.

0/17

Introduction

GROUPING SETS

Summary

4.

Final Quiz

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

0/8

Introduction

Quiz

The End

Reviews (14)

Average rating

4.79/5

☆☆☆☆☆
★★★★★

1964 ratings

Details

5 stars

82%

4 stars

17%

3 stars

1%

2 stars

0%

1 stars

0%