Creating Basic SQL Reports

Teach yourself how to build basic SQL reports to track and analyze the performance of your metrics.

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 69 present and future courses

Save $450

Unlimited lifetime access


to all 69 present and future courses



75% OFF

Buy now

Interactive exercises

10 h

Estimated time


Users enrolled


4220 ratings

This online course will be of interest to junior programmers and software developers.

This course is perfect for people who know SQL basics and would like to analyze their work using meaningful SQL reports. This knowledge can be used with database engines: PostgreSQL, MySQL (8.0 and higher), Oracle, SQL Server, SQLite.

Cartoon people looking at various charts

Welcome to our Creating Basic SQL Reports course! In this course, we'll teach you how to make use of your knowledge to build basic SQL reports. Thanks to this learning, you'll nail tracking and analyzing key metrics of your company. Whether you're a marketer, accountant or working in sales, this course helps you become more productive. Not convinced?

Imagine you're working at a digital marketing agency. Your client wants to know more about their target audience so you've conducted a survey, which was sent out to 15,000 users. Congrats! The survey went very well, and over 85% of users responded! Real fun was about to start, but you realized the data was collected in a company database. Sure, you could ask your IT department for help but they're super busy at this point. How will you know how the users responded? How can you count objects based on your criteria or find trends? Thanks to data, we're able to measure company activities and make more informed decisions. But you need to know how to analyze that data to make it meaningful.

Once you complete the Creating Basic SQL Reports course, you'll be able to do all of the above: you'll create simple SQL reports, organize long queries, include multiple metrics in a single query, and operate on a database with several tables.

As a warm up, we'll review your basic SQL skills and introduce you to the database model we designed for the course.

Then, we move on to show you how to use popular SQL aggregate functions like COUNT() or SUM() to summarize data in SQL. You'll count business objects based on your criteria and calculate total amounts based on multiple objects like a real SQL data analyst!

At the end of each part, you'll be challenged with a short summary quiz.

Next, we move on to present how you can classify your data using the CASE WHEN as well as the GROUP BY clause. While explaining the intricacies of the GROUP BY clause, we'll together review a few typical mistakes that beginners make.

In the last part, we'll talk about comparing different business groups in a single report, and we'll show you three methods of doing this so you can always pick the one that best matches your needs.

Each of the sections comes with extensive practice material, which means you'll write lots of SQL code on your own.

Click the "Start for free" button to learn more!

What's in It for Me?

  • 97 interactive exercises. Learn at your own pace, from anywhere and anytime. Interact with hands-on exercises for improved retention.
  • Lifetime access to the course. When you purchase the course, you'll get instant personal access to all of its content.
  • 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 exercises, or ask questions and share insights with other members of our community through the Discuss tab.

What Are the Requirements?

  • A web browser and an Internet connection.
  • Understanding of basic SQL concepts which we present in our SQL Basics course.

Learn How to:

  • Use popular SQL aggregate functions such as COUNT() or SUM() to summarize data in SQL.
  • Classify data: how you can create custom classifications of objects in SQL using the CASE WHEN syntax and how you can use classifications to group objects in the GROUP BY clause.
  • Calculate average values, maximum averages, and minimum averages.
  • Organize long queries in a clear way.
  • Put multiple metrics in a single report.
  • Calculate ratios and percentages.
  • Compare global and granular metrics.
  • Compare different business groups in a single report picking one of three methods presented in the course.
  • Use common table expressions (CTEs).

Who Should Take This Course?

  • Analysts with basic SQL skills who want to create meaningful reports.
  • Beginner data science enthusiasts with SQL knowledge.
  • Business analysts with basic SQL knowledge who want to generate business metrics in SQL.
  • Anyone interested in starting a career in SQL reporting.

Table of contents


Paid content


Course progress


Exercises completed



Get to know the data model and review some basic SQL concepts.



Get to know the database



Summarizing Data in SQL

Learn how to create simple yet useful business metrics.



Providing detailed information and counting objects

Calculating metrics for multiple business objects

Understanding the difference between various count metrics



Classifying Data with CASE WHEN and GROUP BY

Discover how to get metrics based on custom classifications.



Custom classifications of business objects

Custom grouping of business objects

Custom counting of business objects



Multi-level Aggregation

Learn how to construct reports that aggregate data on multiple levels.



Basic multi-level aggregation

Multi-level aggregation in groups

Multi-level aggregation with custom classification

Three or more aggregation levels



Multiple Metrics in One Report

Discover how to include multiple metrics in a single report.



Multiple metrics for a single object

Metrics for two groups

Ratios and percentages

Global vs. specific metrics



Comparing Groups in One Report

Find out even more about how you can compare groups in single SQL reports.



Method One

Method Two

Method Three


Reviews (4)

Average rating



4220 ratings


5 stars


4 stars


3 stars


2 stars


1 stars