SQL for Data Analysts, Hands-on analysis skills for industry
- Description
- Curriculum
- FAQ
- Reviews
SQL really is the language of Data Analysis.
-
This course will teach you the most useful querying techniques for industry.
-
Unlike other courses you’ll be taught with industry-style data.
Learning to use SQL well, allows you to query the data in your organisation’s databases so that you can answer the questions you have as a data and business professional. It is the “bread and butter” skill that data professionals have used for decades and it’s as in-demand today as its ever been – especially on the cloud!.
I’ve put together all of the useful topics I already teach in my day-job, into one convenient course for you!
For anyone wanting to move into the field of Data Analysis or Data Science, or those who have only worked with spreadsheets, or relied on others to query the data for them, this course will help you grasp the most useful SQL functionality and enable you to grow in your role.. even if you have no programming experience. Once you have that skill to query data in different ways and without reliance on others, you’ll be able to find useful ways to extract it and analyse it. It’s only then that you gain insight into what organisational databases hold.
This course comes with a financial database based upon an insurance claims model (something easily understood) which you’ll learn to query and build your skills with. All the lessons and exercises will be based on this database so you’ll have the freedom to explore and investigate relationships in the data that other courses aren’t usually able to offer. You’ll have access to all of the code used by the instructor so you can follow along, as well as the solution to exercises that you’ll use to shore-up your skills. You’ll also have access to me through Q&A of-course!
The techniques you learn can be applied on multiple platforms. Whether you are using PostgreSQL, MySQL, AWS Athena, or any other environment that requires SQL for querying. Once you get started, you’ll quickly be able to adapt what you learn for use anywhere.
We’ll take you through from the very basics, through to advanced functionality most commonly used in industry and not just the vanilla content you’ll see in most other courses. You’ll soon be a SQL hero.
So what are you waiting for?
-
1Welcome to Hands-On SQL for Data AnalystsVideo lesson
In this lesson I will introduce myself and why I believe SQL is the most important query language to learn as a Data Analyst or Data Scientist.
-
2Objectives of this courseVideo lesson
I will go through what we want to cover during this course. This course covers from beginner to intermediate so there's a lot to cover to bring you up to a competent level depending upon your experience, but I'll be there every step of the way with you!
-
3Installing PostgreSQL and PGAdmin on MacOSVideo lesson
Installing the tools for this course will allow you to follow along with the lectures and practice the concepts we learn. This lecture will walk you through the installation on a MacOS personal computer. Skip to the MS Windows installation video if you don't use MacOS.
-
4Installing PostgreSQL and PGAdmin on Microsoft WindowsVideo lesson
Installing the tools for this course will allow you to follow along with the lectures and practice the concepts we learn. This lecture will walk you through the installation on a personal computer running Microsoft Windows operating system
-
5Creating our database for the courseVideo lesson
In this lesson we will go through the process of setting up the data structures and putting the data into our tables that we shall be querying for the purpose of this course. We will also learn a little about the PGAdmin tool. The script is included in the Resources section. DOWNLOAD the script in the Resources section of this lesson because you will need to use it. Please be careful not to amend the script and please note: the scripts are for your personal use and not to be distributed. Thanks.
-
6Understanding the Wardown Park Insurance databaseVideo lesson
In this lesson I will show you how the Motor Claims business of Wardown Park Insurance works. You'll then be able to understand the relationship between the tables in our database.
-
7The SELECT statementVideo lesson
In our first lesson, we shall learn how to form a SQL statement. For any of the lessons, you can copy and paste the text from the attached scripts into PGAdmin.
Download and open the attached script in an editor of your choice. I don't recommend opening the attached scripts using PGAdmin Open File as some scripts include notes for you as well. Just copy and paste what you need into PGAdmin Query Editor -
8The COUNT() functionVideo lesson
The COUNT() function returns the number of rows that matches a specified criteria. Its a useful way of determining how many records meet the conditions of your SQL query.
-
9The DISTINCT statementVideo lesson
The SELECT DISTINCT statement allows us to return only distinct (unique) results from our queries
-
10Using ORDER BY to arrange your resultsVideo lesson
ORDER BY is used to sort the result set in either ascending or descending order or a combination depending upon the criteria you choose
-
11WHERE condition (and an introduction to SQL Operators)Video lesson
The WHERE clause is used to filter records so that we only return records that fulfil a specific selection criteria
-
12Decision making using CASEVideo lesson
The CASE expression is a powerful construct that allows us to determine the output of our query based upon existing column values. The CASE expression goes through a list of specified conditions and returns a value when the first condition is met. If no conditions are true, it returns the value in the ELSE clause or if there is no ELSE, it returns NULL.
-
13Handling NULLs (Part 1)Video lesson
In these lectures we shall learn to handle NULL values in our table and how to deal with them for our result set.
Note that the resource file is relevant to all lectures covering NULLS -
14Handling NULLs (Part 2) : Using COALESCEVideo lesson
Further discussion on the topic of handling NULLs in SQL. Scripts are attached in Part 1 of this topic.
-
15Practice SQL BasicsText lesson
-
16SQL Logical Operators (Part 1)Video lesson
In this lesson we shall look at the following logical operators : AND,EXISTS,LIKE,IN,OR
-
17SQL Logical Operators (Part 2)Video lesson
To conclude our look at Logical Operators in SQL, we will look at BETWEEN, ANY, ALL, AND
-
18Practice SQL Logical OperatorsText lesson
-
19SQL Comparison OperatorsVideo lesson
We will now look at comparison operators to compare two separate expressions
-
20Practice SQL Comparison OperatorsText lesson
-
21UNION (Part 1)Video lesson
In this lesson we learn about how to use the UNION operator to combine the result-sets of multiple SELECT statements. In part 1 we learn the rules on how we can form successful UNIONs of data
-
22UNION (Part 2)Video lesson
In Part 2 of our lesson on how to use the UNION operator, we shall learn how to code our UNION statements
-
23Practice SQL UNION OperatorText lesson
-
24Subqueries Part 1 : Scalar and Multi-column SubqueriesVideo lesson
In this lesson we shall look at Scalar, as well as Multiple Column subqueries. There's a lot of coding in this lesson so please use the scripts in the resources section to follow along and try out the examples
-
25Subqueries Part 2 : Correlated SubqueriesVideo lesson
In this lesson we discuss Correlated Subqueries where the outer and inner query are intrinsically linked. Scripts are attached to Part 1 of this topic.
-
26Subqueries Part 3 : Common Table ExpressionsVideo lesson
In this lesson we look at other ways of nesting SQL statements as well as the use of Common Table Expressions. Scripts are attached to Part 1 of this topic.
-
27Practice SubqueriesText lesson
-
28Table Join conceptsVideo lesson
This lesson will cover the concepts around JOINs and discuss INNER, LEFT/RIGHT JOIN and OUTER JOIN
-
29Coding JoinsVideo lesson
We will now learn how to code our JOIN operation
-
30Self JoinVideo lesson
In this lesson we will understand and code self-joins in SQL. This is a powerful construct allowing us to exploit the data from a table where one record has a relationship to other records within the same table. Scripts are attached to the Coding Joins lesson.
-
31Understanding Multi-table JoinsVideo lesson
We now discuss how to join three or more tables in a single SQL SELECT statement.
-
32Coding Multi-table JoinsVideo lesson
How to code a JOIN between three or more tables in SQL
-
33Practice JOINsText lesson
-
34Simple AggregationVideo lesson
In this lesson we shall look at the simple aggregation functions COUNT(), MIN(), MAX(), AVG() and how they allow you to summarise data effectively
-
35GROUP BY Part 1Video lesson
GROUP BY allows us to group rows that have the same values in a specified column, so that we can apply functions against each group of data
-
36GROUP BY Part 2Video lesson
In this lesson we continue our journey with GROUP BY to explore more ways on how we can use it in our exploration of data. Scripts are attached to Part 1 of this topic.
-
37HAVINGVideo lesson
HAVING allows us to filter data when using GROUP BY. It works similar to WHERE but you'll learn how we use them both together. In this lesson we will go through how to use it
-
38DISTINCT revisitedVideo lesson
Extending our earlier discussion on DISTINCT by comparing to GROUP BY
-
39Practice SQL AggregationText lesson
-
40Data Types, Constraints, Primary-Keys ExplainedVideo lesson
Understanding data types ensures that we understand the format and the value of each column value, so we can interpret it appropriately. In this lesson we look at the common data types to expect from any project you are involved in
-
41Considering data types when building queriesVideo lesson
In this lesson we shall look at how to consider certain data types when coding your queries including how to find the data types of columns using PGAdmin
-
42Manipulating Column Data Part 1Video lesson
We discuss different string manipulation functions in SQL
-
43Manipulating Column Data Part 2Video lesson
We learn how to use SQL to manipulate column string values
-
44Manipulating Column Data Part 3Video lesson
In this final lesson in the topic of string manipulation we look at trimming and padding out column values
-
45Number ManipulationVideo lesson
We look at functions available in SQL that allow us to manipulate numerical column values
-
46Date and Time Part 1Video lesson
In this lesson we look at functions used to extract useful information from data fields values
-
47Date and Time Part 2Video lesson
We continue our exploration of extracting components of date-time columns and how to determine differences between two date fields for the purpose of determining time-passed
-
48Practice Column Data ManipulationText lesson
-
49Pivot Data Part 1Video lesson
In Part 1 of Pivots we discuss the value of being able to pivot data for analysis. This is often done in spreadsheets to see data in different ways and extract value
-
50Pivot Data Part 2Video lesson
In the second lesson on Pivots we learn how to pivot data using SQL so that we can extract value from it
-
51Practice Pivoting DataText lesson
-
52Regular Expressions explainedVideo lesson
We explain the value of using regular expressions in our data analysis
-
53LIKE and Wildcard in Regular ExpressionsVideo lesson
We look at how to use he LIKE and SIMILAR TO operators to match patterns in data. The scripts for all the lessons in this topic are attached to this lecture.
-
54POSIX operatorsVideo lesson
In this lesson we take a look at the POSIX regular expression standard for pattern matching and how to use it in SQL
-
55Ranges in Regular ExpressionsVideo lesson
When matching patterns, we sometimes need to express a range of possible patterns that a particular column value should match. We explain how to use this in our code when comparing our column data to our regular expression
-
56Worked example using Regular ExpressionsVideo lesson
We shall use the example to determine how regular expressions can be used to validate any given email address
-
57Practice Regular ExpressionsText lesson
-
58ROWNUMVideo lesson
We begin with looking at one of the most useful Analytical functions available, the use of ROWNUM to number the records returned from our query when using a partition in SQL
-
59RANK and DENSE RANKVideo lesson
RANK and DENSE RANK allow us additional methods by which to label the position of a record within a partition
-
60LAG and LEADVideo lesson
LAG and LEAD allow us to compare data in a row to the record before or after the one being processed within a partition. This allows us to compare the difference in dates, sums, amounts etc .. very useful for analytics as we'll see.
-
61Other useful Window FunctionsVideo lesson
We'll look at a few other useful functions : FIRAST_VALUE, LAST_VALUE, NTILE,CUME_DIST
-
62Practice Window FunctionsText lesson
External Links May Contain Affiliate Links read more