fbpx
Search
Close this search box.

FREE Data Analyst Course

Table of Contents

Module 1: Data & SQL

As a data analyst, you will be working with LOTS of data. So the first and most natural thing to learn about is, how to use data. In this module, we will cover all the essential and vital concepts of working with databases, data sources and data repositories.

The key skills you will gain are,

  • What is a database
  • How to install MySQL on your computer
  • Primary key vs. Foreign key
  • CRUD operations
  • Writing SQL queries
  • Advanced SQL concepts
    • Joins
    • Grouping
    • CTE (Common Table Expressions)
    • Functions

Lesson 1: Introduction to Databases & SQL

In the very first lesson, learn how to use a database on your computer (with MySQL).

Resources and downloads for this lesson:

Watch the lesson:

You can watch this lesson below or on my YouTube channel here.

Play Video

Introducing Excel + Power BI on-demand course for data analysts.

If you are looking for a one-stop place to learn all the advanced Excel, Power Query, Power Pivot and Power BI techniques to work as a data analyst, consider my online class today.

Click here for more information.

Lesson 2: Advanced SQL for Data Analysis
(10 Examples)

Now that you have SQL concepts and database understanding, let’s examine 10 practical, everyday data analysis scenarios and build SQL queries for the same. By the end of this lesson, you will learn:

  • How to use WHERE clause in SQL
  • Work with AND / OR / LIKE / IN operators in SQL
  • Getting DISTINCT values with SQL
  • Grouping data with GROUP BY
  • Using SQL JOINS
  • Creating Common Table Expressions (CTE)
  • Business Analysis and Decision Making with SQL
10 SQL Queries + Homework (BLANK)

Here are the 10 example SQL queries and home work problems. This is a blank file. Use it to practice and improve your SQL skills.

#10 Sample queries for SAKILA Database

# 1) All films with PG-13 films with rental rate of 2.99 or lower

# 2) All films that have deleted scenes

# 3) All active customers

# 4) Names of customers who rented a movie on 26th July 2005

# 5) Distinct names of customers who rented a movie on 26th July 2005

# H1) How many distinct last names we have in the data?

# 6) How many rentals we do on each day?

# 7) All Sci-fi films in our catalogue

# 8) Customers and how many movies they rented from us so far?

# 9) Which movies should we discontinue from our catalogue (less than 5 lifetime rentals)

# 10) Which movies are not returned yet?

# H2) How much money and rentals we make for Store 1 by day?
# What are the three top earning days so far?

10 SQL Queries (Completed)

Here are all the 10 queries completed against SAKILA sample database in MySQL.

# 1) All films with PG-13 RATING with rental rate of 2.99 or lower

SELECT * FROM film f
where f.rental_rate <=2.99
and f.rating = ‘PG-13’;

# 2) All films that have deleted scenes

select f.title, f.special_features, f.release_year
from film f
where f.special_features like ‘%Deleted Scenes%’
and title like ‘c%’;

# 3) All active customers

select * from customer
where active=1;

# 4) Names of customers who rented a movie on 26th July 2005

select r.rental_id, r.rental_date, r.customer_id,
concat(c.first_name,’ ‘, c.last_name) ‘Full name’ from rental r
join customer c on c.customer_id = r.customer_id
where date(r.rental_date) = ‘2005-07-26’;

# 5) Distinct names of customers who rented a movie on 26th July 2005
select distinct r.customer_id,
concat(c.first_name,’ ‘, c.last_name) ‘Full name’ from rental r
join customer c on c.customer_id = r.customer_id
where date(r.rental_date) = ‘2005-07-26’;

# H1) How many distinct last names we have in the data?

# 6) How many rentals we do on each day?

select date(rental_date) d, count(*) from rental
group by date(rental_date);

# 7) All Sci-fi films in our catalogue

SELECT * FROM CATEGORY;

SELECT * FROM film_category WHERE category_id=14;

select fc.film_id, fc.category_id,c.name, f.title, f.release_year from film_category fc
join category c on c.category_id = fc.category_id
join film f on f.film_id = fc.film_id
where c.name=’Sci-Fi’;

# 8) Customers and how many movies they rented from us so far?

select r.customer_id, c.first_name, c.email, count(*) ‘Count’
from rental r
join customer c on c.customer_id = r.customer_id
group by r.customer_id
order by count(*) desc;

select c.customer_id, c.first_name, c.email, count(r.customer_id)
from customer c
left outer join rental r on c.customer_id = r.customer_id
group by c.customer_id;

# 9) Which movies should we discontinue from our catalogue (less than 5 lifetime rentals)

// Refer to the correct query below.

with low_rentals as
(select inventory_id, count(*)
from rental r
group by inventory_id
having count(*)<=1)
select low_rentals.inventory_id, i.film_id, f.title
from low_rentals
join inventory i on i.inventory_id = low_rentals.inventory_id
join film f on f.film_id = i.film_id;

 

// CORRECT QUERY

 

with low_rentals as
(select i.film_id, count(*)
from rental r
join inventory i on i.inventory_id = r.inventory_id
group by i.film_id
having count(*)<=5)
select low_rentals.film_id, f.title
from low_rentals
join film f on f.film_id = low_rentals.film_id;

# 10) Which movies are not returned yet?

SELECT rental_date, customer_id, i.film_id, f.title
FROM RENTAL r
join inventory i on i.inventory_id = r.inventory_id
join film f on f.film_id = i.film_id
WHERE r.return_date is null
order by f.title;

# H2) How much money and rentals we make for Store 1 by day?
# What are the three top earning days so far?

 

Home work solutions

# H1) How many distinct last names we have in the data?

select count(distinct last_name) from customer;

 

# H2) How much money and rentals we make for Store 1 by day?

select date(p.payment_date),sum(p.amount) from payment p
join rental r on r.rental_id = p.rental_id
join inventory i on i.inventory_id = r.inventory_id
where i.store_id = 1
group by date(p.payment_date)
order by date(p.payment_date);

 

# What are the three top earning days so far?

select date(p.payment_date),sum(p.amount) from payment p
join rental r on r.rental_id = p.rental_id
join inventory i on i.inventory_id = r.inventory_id
where i.store_id = 1
group by date(p.payment_date)
order by sum(p.amount) desc
limit 3

 

Watch the lesson:

Watch the lesson below or on my Channel here.

Additional Resources on SQL

In the first two lessons of this free data analyst course, I’ve introduced the essential and necessary concepts of SQL. Please refer to below pages / videos for more on SQL.

Lesson 3: How to use Power Query
in 30 minutes

While SQL is great for data analysis, it has one serious limitation. It can only work with data in a database / datawarehouse. What if the data you want to analyze is in a PDF or webpage or SharePoint folder? In such cases, SQL is almost useless.

This is where Power Query shines.

Power Query is the de-facto query language of Power BI and Excel. Using Power Query, we can connect to any kind of data and perform operations on it (like filtering data, grouping, joining, cleaning up, adding new columns or setting up automations).

So the last lesson of our data segment shall focus on Power Query and introduces how we can use it to work with business data problems.

Topics you will learn in this lesson:

  • What is Power Query and why it is important?
  • How to use Power Query?
  • Using Power Query to scrape web data (live example)
  • Data cleaning and transformations with Power Query
  • Adding columns with PQ
  • How to load and refresh data?
  • Working with business data (HR example)
  • Understanding “column quality”
  • Using advanced transformations
  • Creating columns based on business rules
  • Writing M code (simple example)
  • Splitting values
  • Updating data and refreshing the query

 

Sample Files - Power Query

Please grab the sample files for Power Query segment using the links below.

 

Additional Resources on Power Query

Module 2: Excel

Microsoft Excel is the #1 software used by Data Analysts all over the world. That is why, in our module 2 of this free data analyst course, we are going to learn all about Excel. The skills you will gain in this module are:

  • How to use Excel for data analysis
  • Essential Excel Functions & Formulas
  • Excel Pivot Tables
  • Power Pivot & DAX in Excel
  • How to make Excel charts
  • Excel Portfolio Project – Customer Center Data Analysis + Dashboard

 

Technical concepts covered in this module are:

  • Excel tables
  • Writing formulas – cell references, structural referencing, spill ranges
  • Important Excel functions – SUMIFS, COUNTIFS, SUBTOTAL, IF, IFS, VLOOKUP, XLOOKUP, INDEX+MATCH, FILTER, SORT, UNIQUE, IFERROR, CHOOSECOLS, TAKE, Formula nesting.
  • Excel filters & slicers
  • Working with pivot tables
  • Data modeling
  • DAX + Power Pivot
  • Excel charts, Pivot Charts, Chart customization
  • Creating Excel dashboards
  • Conditional Formatting

 

Software used:

  • Excel 365 (you can follow along most of the lessons with Excel 2016+)

 

Lesson 4: Essential Excel for Data Analysis

Excel has 100s of features, so learning what is important can be tricky. In this video, let me distil the essential concepts and present them in a digestible format in just under 40 minutes.

This is “Essential” Excel in 40 minutes.

What you will learn:

  1. How to use data in Excel
  2. The importance of Excel tables
  3. Working with Filters & Slicers in Excel to do quick analysis
  4. Using “Total Row” / SUBTOTAL function
  5. Understanding Excel cell references – Relative / Absolute / Structural / Spill
  6. Important and useful Excel functions – IF, IFS, SUBTOTAL
  7. Creating and using Pivot Tables
  8. Making Excel Charts – Box plots to explore salary distribution
  9. Interactive charts with slicers
  10. Next steps to improve your understanding of Excel

 

Watch the lesson below (or on my YouTube channel):

Sample Files - Essential Excel

Please download these files to learn the Essential Excel Concepts:

Additional Resources: Excel basics → Advanced

Introducing Advanced Excel + Dashboards on-demand course for data analysts.

If you are looking for a one-stop place to learn all the advanced Excel, Power Query, Power Pivot and dashboard techniques to work as a data analyst, consider my online class today.

Click here for more information.

Lesson 5: Excel Formulas + Functions

There are 200+ functions in Excel. But as a data analyst, you just need to know only a handful of them. In this lesson, we are going to learn the most important functions and formulas in Excel with 10 practical business problems.

Functions you will be learning are:

  • SUMIFS
  • COUNTIFS
  • MIN / MAX
  • SMALL / LARGE
  • FILTER
  • SORT
  • TAKE
  • UNIQUE
  • VLOOKUP
  • XLOOKUP
  • INDEX + MATCH
  • CHOOSECOLS
  • IFERROR
  • Nesting formulas

 

Watch the lesson below (direct YouTube link):

 

Sample Files - Excel Formulas

Additional Resources - Excel Formulas

Lesson 6: Excel Pivot Tables & Charts

While Excel formulas are powerful, you also need to plan and think hard before writing them to solve business problems. This is why I love Pivot tables. They are really easy to make and provide the biggest bang for buck. We can use Pivots to analyze data and answer business questions effectively and elegantly in short amount of time.

In this lesson, learn how to:

  • Create a pivot table from your data
  • Using the fields panel to construct your “dream” pivot
  • Work with report filters, top 10 filters and sort options
  • Change calculation in the pivot
  • Set up slicers to “interact” with pivot tables
  • Create “groups” in pivots
  • Make pivot charts to analyze trends
  • Calculate Cumulative “running” totals in Pivots
  • Use conditional formatting with Pivots
  • Percentage analysis with Pivots
  • Set up advanced pivot tables to solve business problems

Watch the lesson below (Excel Pivot Tables Tutorial on YouTube):

Sample Files - Excel Pivot Tables

Additional Resources on Pivot Tables

Lesson 7: Excel Portfolio Project

Demo of our Excel Portfolio Project

In our final lesson of Excel module, we will be building a call centre performance dashboard as show-cased above. Stay tuned for the video. It will be added on 17th of September.