OUTLINE
• Introduction to Business Analytics
• Data Visualization using Excel
• SQL Database management
• Tableau data visualization and reporting
• SQL and Tableau
WHAT IS BUSINESS ANALYTICS
WHAT IS BUSINESS ANALYTICS
• Using tools and techniques to turn data into meaningful business insights
• Business analytics (BA) is the iterative, methodical exploration of an
organization's data.
WHAT IS BUSINESS ANALYTICS
• Business analytics is used by companies that are committed to making data-
driven decisions
• Data-driven companies treat their data as a corporate asset and actively look
for ways to turn it into a competitive advantage.
ACTIVITY
• Identify two companies and Identify the competitive advantage of one
company over the other.
WHAT IS BUSINESS ANALYTICS
Data
BUSINESS INSIGHTS
Data TOOLS &
TECHNIQU
ES
Data
WHAT IS BUSINESS ANALYTICS
GOOD DATA NOISE
MESSY DATA BUSINESS INSIGHT
GARBAGE DATA NOISE
HISTORY OF BUSINESS ANALYTICS
1970 - 1990
1930 - 1940 • Computer based systems to store
• Decoding messages information
WISDOM HIERARCHY
• DIKW Model
TYPES OF ANALYTICS
TYPES OF ANALYTICS
• 3 Types of analytics
• Descriptive Analytics
• Predictive Analytics
• Prescriptive Analytics
TYPES OF ANALYTICS
Descriptive Analytics – What Happened
• Analyze based on past data
• The main objective of descriptive analytics is to find out the reasons behind precious
success or failure in the past
TYPES OF ANALYTICS
Predictive Analytics – What might Happen?
• Usage of statistical models to do the Analysis
• Analysing past data patterns and trends helps in setting realistic goals for the business,
effective planning.
• The best example where predictive analytics find great application is in producing the
credit score. Credit score helps financial institutions decide the probability of a customer
paying credit bills on time.
TYPES OF ANALYTICS
Predictive analytics can be further categorized as –
• Predictive Modelling –What will happen next, if ?
• Root Cause Analysis-Why this actually happened?
• Data Mining- Identifying correlated data.
• Forecasting- What if the existing trends continue?
• Monte-Carlo Simulation – What could happen?
• Pattern Identification and Alerts –When should an action be invoked to correct a process.
TYPES OF ANALYTICS
Prescriptive Analytics – What should we do?
• Use both descriptive analytics and predictive analytics
• Large scale organizations use prescriptive analytics for scheduling the inventory in the supply
chain, optimizing production, etc. to optimize customer experience.
• Prescriptive analytics can be used in healthcare to enhance drug development, finding the right
patients for clinical trials, etc.
BUSINESS ANALYTICS TERMS
• Data Science
• Business Intelligence
• Big Data
• Data Mining
• Machine Learning
• Business analysis
• Data analytics
BUSINESS ANALYTICS TERMS
• Reasons for all the words in existence
• Constant evolution of data science industry
BUSINESS ANALYTICS TERMS
• Started 25 years ago with the word “statistician”
• Responsible for gathering and cleaning data sets
• Applying statistical methods
BUSINESS ANALYTICS TERMS
• Rapid growth of data
• Radical improvement in technology
• Statisticans required to extract pattern from data
BUSINESS ANALYTICS TERMS
• Rapid growth of data
• Radical improvement in technology
• Statisticans required to extract pattern from data
• New term was coined – Data Mining
BUSINESS ANALYTICS TERMS
• New models were introduced
• Now able to perform more accurate forecasts
• Now it is called Data Science
BUSINESS ANALYTICS TERMS
• HR’s
• HR’s created new job titles for attracting employees and hence other terms got its
existence – Business Analytics/ Data Analytics
BUSINESS ANALYTICS TERMS
• Analysis VS Analytics
BUSINESS ANALYTICS TERMS
• Analysis VS Analytics
BUSINESS ANALYTICS TERMS
• Analysis is done for past data
• Explains how and why?
• Analytics refers to the future
• Explore potential future events
BUSINESS ANALYTICS TERMS
BUSINESS ANALYTICS TERMS
BUSINESS ANALYTICS TERMS
BUSINESS ANALYTICS TERMS
Let us see how the terminologies fit in the area of business
VIDEO CASE STUDIES
Google Data Center
Data collection by M&M in the making of xuv 500
BUSINESS ANALYTICS PROCESS
PROCESS
• Define the problem
• Get the information
• Perform analytics
• Measure the outcome
SQL
SQL IS STRUCTURED QUERY LANGUAGE, WHICH
IS A COMPUTER LANGUAGE FOR STORING,
MANIPULATING AND RETRIEVING DATA STORED
IN A RELATIONAL DATABASE
SQL – SELECT OPERATOR
SQL
• SELECT statement – used to load a particular data from the database
• Format
SELECT coloumn1,column2,…column
FROM table_name;
SQL
• Excercise:
o Load first name and last name from the employees table
o Load All the data from the employees table
• Load department number from departments table
• Load all data from departments table
SQL – WHERE OPERATOR
SQL
• WHERE - used to narrow down the search criteria
• Format
SELECT coloumn1,column2,…column
FROM table_name
WHERE condition;
SQL
• Excercise:
o Load the employees from the employees table whose first name is “Saniya”
o Load the employees from the employees table whose first name is “Mahendra”
o Load the employees from the employees table whose first name is “Subbu”
SQL – AND OPERATOR
SQL
• AND = Allows you to logically combine two statements in the condition
code
• Format
SELECT coloumn1,column2,…columnN
FROM table_name;
Where condition_1 and condition_2
SQL
• AND = Allows you to logically combine two statements in the condition code
• Excercise:
o Load the employees from the employees table whose first name is “Saniya” and last
name is “Khalil”
o Load the employees from the employees table whose first name is “Mahendra” and last
name is “dasSarma”
o Retrieve a list with all female employees whose first name is Kellie.
SQL – OR OPERATOR
SQL
• OR = Allows you to logically execute either of the two statements in the
condition code
• Format
SELECT coloumn1,column2,…columnN
FROM table_name;
Where condition_1 or condition_2
SQL
• Excercise:
• Retrieve a list with all employees whose first name is either Kellie or Aruna.
SQL
• Example
• Select all the employees whose last name is “denis” and gender is either male or female
SQL
• Example
• Select all the employees whose last name is “denis” and gender is either male or female
• Is it correct?
• You have to consider operator precedence. AND is Always executed before OR
• Use Brackets
SQL
• Example
• Retrieve a list with all female employees whose first name is either Kellie or Aruna.
SQL – IN OPERATOR
SQL
• Example
• Retrieve the employees list whose first name is Cathie, Mark and Nathan.
SQL
• IN operator – IN Operator allows SQL to return the data written in
parenthesis
• SELECT column_name(s)
FROM table_name
WHERE column_name IN (value1, value2, ...);
SQL
• SELECT *
FROM employees
WHERE first_name IN (‘Cathie’,’Mark’,’Nathan’);
SQL
• Use the IN operator to select all individuals from the “employees” table,
whose first name is either “Denis”, or “Elvis”.
SQL – NOT IN OPERATOR
SQL
• NOT IN operator – NOT IN Operator allows SQL to return the data
excluding what is written in parenthesis
• SELECT column_name(s)
FROM table_name
WHERE column_name NOT IN (value1, value2, ...);
SQL
• Exercise –
• Retrieve the employees list whose first name is “NOT” Cathie, Mark and
Nathan.
SQL
• Exercise –
• Extract all records from the ‘employees’ table, aside from those with
employees named John, Mark, or Jacob.
SQL – LIKE OPERATOR
SQL
• LIKE - The LIKE operator is used in a WHERE clause to search for a specified
pattern in a column.
• There are two wildcards often used in conjunction with the LIKE operator:
• % - The percent sign represents zero, one, or multiple characters
• _ - The underscore represents a single character
• SELECT column1, column2, ...
FROM table_name
WHERE columnN LIKE pattern;
SQL
WHERE CustomerName LIKE 'a%' Finds any values that start with "a"
WHERE CustomerName LIKE '%a' Finds any values that end with "a"
WHERE CustomerName LIKE '%or%' Finds any values that have "or" in any
position
WHERE CustomerName LIKE '_r%' Finds any values that have "r" in the second
position
WHERE CustomerName LIKE 'a__%' Finds any values that start with "a" and are
at least 3 characters in length
WHERE ContactName LIKE 'a%o' Finds any values that start with "a" and ends
with "o"
SQL
• Example – Retrieve the list of employees whose first name begins with ‘Mar’
• Retrieve the list of employees whose first name ends with ‘ar’
• Retrieve the list of employees where the first name contains ‘ar’ in the name
• Retrieve the list of employees where the name contains 4 letters and the first three letter are
‘mar’
• Retrieve a list with all employees who have been hired in the year 2000
• Retrieve a list with all employees whose employee number is written with 5 characters, and
starts with “1000”.
SQL – NOT LIKE OPERATOR
SQL
• NOT LIKE - The Not LIKE operator is used to get records that doesn’t match
the like pattern.
• SELECT column1, column2, ...
FROM table_name
WHERE columnN NOT LIKE pattern;
SQL
• Example: display the list of customers where the first name doesn’t start with
‘mar’
EXERCISE
• Extract all individuals from the ‘employees’ table whose first name contains
“Jack”.
• Once you have done that, extract another list containing the names of
employees that do not contain “Jack”.
SQL – BETWEEN OPERATOR
SQL
• The BETWEEN operator selects values within a given range. The values can
be numbers, text, or dates.
• SELECT column_name(s)
FROM table_name
WHERE column_name BETWEEN value1 AND value2;
SQL
• Select all the information from the “salaries” table regarding contracts from
66,000 to 70,000 dollars per year.
• Retrieve a list with all individuals whose employee number is not between
‘10004’ and ‘10012’.
• Select the names of all departments with numbers between ‘d003’ and
‘d006’.
SQL – IS NULL/NOT NULL OPERATOR
SQL
• The NOT NULL constraint enforces a column to NOT accept NULL values.
• SELECT column_name(s)
FROM table_name
WHERE column_name IS NOT NULL;
SQL
• Select the names of all departments whose department number value is not
null.
• Select the names of all departments whose department number value is null.
SQL – COMPARISON OPERATOR
=, >, >=, =<, <, <>, !=
SQL
• SELECT column_name(s)
FROM table_name
WHERE column_name >,<,>=,<=,<>;!= “condition”;
SQL
• Retrieve a list with data about all female employees who were hired in the
year 2000 or after.
• Extract a list with all employees’ salaries higher than $150,000 per annum.
• Extract a list with all employees’ whose first name is not equal to mark and
hire date is lesser than year 2000
SQL – DISTINCT OPERATOR
SQL
• The SELECT DISTINCT statement is used to return only distinct (different)
values.
• SELECT DISTINCT column1, column2, ...
FROM table_name;
SQL
• Obtain a list with all different “hire dates” from the “employees” table.
SQL – AGGREGATE OPERATOR
COUNT, SUM, MIN, MAX, AVG
SQL
• Count() – counts the number of non null records in a field
• Sum() – sum all the non null values in a record
• MIN() – returns the min value in the entire list
• MAX() – returns the maximum value in the entire list
• AVG() – returns the average of all non null values in a column
SQL
• Count() –
• SELECT COUNT(column_name)
FROM table_name
WHERE condition;
• SUM () –
• SELECT SUM(column_name)
FROM table_name
WHERE condition;
SQL
• SELECT AVG(column_name)
FROM table_name
WHERE condition;
• SELECT MIN(column_name)
FROM table_name
WHERE condition;
SQL
• How many annual contracts with a value higher than or equal to $100,000
have been registered in the salaries table?
• How many managers do we have in the “employees” database? Use the star
symbol (*) in your code to solve this exercise.
• How many departments are there in the “employees” database? Use the
‘dept_emp’ table to answer the question.
SQL
• What is the total amount of money spent on salaries for all contracts starting
after the 1st of January 1997?
• Which is the lowest employee number in the database?
• Which is the highest employee number in the database?
• What is the average annual salary paid to employees who started after the
1st of January 1997?
SQL – ROUND FUNCTION
SQL
• Select ROUND(column or no, decimals)
FROM table_name
WHERE condition;
• Round the average amount of money spent on salaries for all contracts that
started after the 1st of January 1997 to a precision of cents.
SQL – ORDER BY
SQL
• The ORDER BY keyword is used to sort the result-set in ascending or
descending order.
• SELECT column1, column2, ...
FROM table_name
ORDER BY column1, column2, ... ASC|DESC;
SQL
• Select all data from the “employees” table, ordering it by “hire date” in
descending order.
• Select all data from the employees table. Order by first name in ascending
order and then order by last name in ascending order.
SQL – GROUP BY
SQL
• Group By is used to group the results to a specific field or fields.
• Group By must be placed immediately after the where condition if any and just
before the order by clause.
• SELECT column_name(s)
FROM table_name
WHERE condition
GROUP BY column_name(s)
ORDER BY column_name(s);
SQL
• Find out how many times the same hire date has been encountered in the data
base.
• Once found, sort it in the descending order.
SQL – ALIASES (AS)
SQL
• SQL aliases are used to give a table, or a column in a table, a temporary
name.
• SELECT column_name AS alias_name
FROM table_name;
SQL
• Write a query that obtains an output whose first column must contain annual
salaries higher than 80,000 dollars. The second column, renamed to
“emps_with_same_salary”, must show the number of employee contracts
signed with this salary.
SQL – JOIN/INNER JOIN
SQL
• Primary key and foreign key
SQL
• SQL Join – the sql tool that allow us to construct a relationship between the
objects
• We must find a related column from the two tables that contain the same type
of data
• We can add any no of columns from these two tables to our output.
SQL
• Understanding create, delete and insert table
• Create two duplicate tables to understand join functionality and not to mess
the original tables
• Create two tables departments_dup and dept_manager_dup
SQL
• DROP TABLE IF EXISTS departments_dup;
• CREATE TABLE departments_dup • INSERT INTO departments_dup (dept_name)
• ( • VALUES ('Public Relations');
• dept_no CHAR(4) NULL, •
• dept_name VARCHAR(40) NULL • DELETE FROM departments_dup
• ); • WHERE
• • dept_no = 'd002';
• INSERT INTO departments_dup • INSERT INTO departments_dup(dept_no) VALUES
('d010'), ('d011');
• (dept_no, dept_name)
• SELECT * FROM departments;
SQL
• DROP TABLE IF EXISTS dept_manager_dup; • VALUES (999904, '2017-01-01'),
• CREATE TABLE dept_manager_dup ( • (999905, '2017-01-01'),
• emp_no int(11) NOT NULL, • (999906, '2017-01-01'),
• dept_no char(4) NULL, • (999907, '2017-01-01');
• from_date date NOT NULL, •
• to_date date NULL • DELETE FROM dept_manager_dup
• ); • WHERE
• dept_no = 'd001';
• INSERT INTO dept_manager_dup
• select * from dept_manager;
• INSERT INTO dept_manager_dup (emp_no, from_date)
SQL
• Create a table Students with the columns – Student_id, First_name, Last_name,
phone_no, mail_id, Gender. Make sure the student id is set to not null.
• Insert your class mates details into the table
• Create another table Students_temp
• Copy all the data from the table “students” to “students_temp”
• Delete the last two records from students_temp
SQL
• SELECT table1.column_name(s), table2.column_name(s)
FROM table1
INNER JOIN table2
ON table1.column_name = table2.column_name;
SQL
• Retrieve the list with department number, department name employee no.
SQL
• Extract a list containing information about all managers’ employee number,
first and last name, department number, and hire date.
• Extract a list containing information about all managers’ employee number,
first and last name, department number, and hire date whose last name is
Markovitch.
DATA VISUALIZATION
DATA VISUALIZATION - EXCEL
• Strive for Clarity and Simplicity
• Maximise impact, minimize noise
• If it doesn’t add value or serve a purpose, get rid of it
• Focus on creating a Narrative
• Don’t just show data, tell a story
• Communicate key insights clearly, quickly and powerfully
• Strike a balance between design and function
• Selecting the right type of chart is critical
• Beautiful is good, functional is better, both is ideal
DATA VISUALIZATION - EXCEL
• Rule of thumb:
• If the viewer cant interpret the story within 10secs, its time to simplify
DATA VISUALIZATION - EXCEL
DATA VISUALIZATION - EXCEL
What did you interpret?
DATA VISUALIZATION - EXCEL
DATA VISUALIZATION - EXCEL
• Basics of Chart
DATA VISUALIZATION - EXCEL
• Bar and Column Chart
• Commonly used for:
• Comparing numerical data across categories
• Ex: total sales by product type, population of the country, revenue by department by
quarter
DATA VISUALIZATION - EXCEL
• Show the data for sales
• in terms of genre
• In terms of month
• By Genre and by month
DATA VISUALIZATION - EXCEL
• Exercise - Create a Clustered Column chart to show Citizen
Population, Registered Voters and Confirmed Voters by state, for the Top 10
states by population
DATA VISUALIZATION - EXCEL
• Exercise - Adjust formatting to match the chart below:
DATA VISUALIZATION - EXCEL
• Exercise - Create Bar Charts to show Citizen Population and Confirmed
Voters for the same 10 states, and adjust formatting to match the examples
below (Hint: you may need to format your axis and select "Categories in
Reverse Order" to sort exactly as shown):
DATA VISUALIZATION - EXCEL
• Line Chart
• Commonly used for:
• Visualizing trends over time
• Ex: stock price by hour, average temperature by month, profit by quarter
DATA VISUALIZATION - EXCEL
• Show the trendline for google and amazon using line chart
DATA VISUALIZATION - EXCEL
• Excercises: Insert a Line Chart to show Mean Temp (F) by day for the entire
data sample, and add a Polynomial Trendline (Order = 2). How does the
mean temperature change over the course of the year?
• Create a second Line Chart to show Mean Wind Speed (MPH) by day for the
entire data sample, and add a Polynomial Trendline (Order = 2). How does
the mean wind speed change over the course of the year?
DATA VISUALIZATION - EXCEL
• Area Charts
• Commonly used for:
• Showing changes in data composition over time
• Ex: sales by department by month,
• % of total downloads by browser, by week
• Population by continent, by decade
DATA VISUALIZATION - EXCEL
• Show the ticket sales using area chart
DATA VISUALIZATION - EXCEL
• Excercises – Open the worksheet area chart. Transpose the data as shown
below
• Using your restructured data, insert a Stacked Area Chart to show Gross
Revenue trending by year, by Rating.
DATA VISUALIZATION - EXCEL
• Pie and Donut Charts
• Commonly used for:
• Comparing proportions totaling to 100%
• Ex: % of budget spent by department, proportion of internet users by age range etc
DATA VISUALIZATION - EXCEL
• Create Pie Charts to show the # of Posts and Post Engagements by time of
day (Morning, Afternoon, Evening & Late Night)
• Create Donut Charts to show the # of Posts and Post Engagements by post
type (Photo, Video, Link & Event)
DATA VISUALIZATION - EXCEL
• Radar Charts
• Commonly used for:
• Plotting 3 or more quantitative variables on a 2-dimentional chart, relative to a central
point
• Ex: comparing test scores across multiple subjects
• Sales of different types of vegetables, by month
DATA VISUALIZATION - EXCEL
• Plot the radar chart to show the personality traits for each person
• Plot the radar chart to show sales of fruits and vegetables by month
• Insert a Radar Chart to visualize the number of shark attacks occuring each
month in Australia, South Africa, and the USA.
• Create a second radar scale for the 2nd chart. What do you notice about when
shark attacks occur in the USA compared to Australia or South Africa?
DATA VISUALIZATION - EXCEL
• Stock charts
• Commonly used for:
• Visualizing stock market data, including volume, high, low , open and closing prices
• Ex: Facebook’s daily stock performance in 2015
• High , low and closing prices for google in Q1
DATA VISUALIZATION - EXCEL
• Create a stock chart to show the volume – open – high – low – close data.
• 1) Select all of the Google stock price data in columns B-G and insert
a Stock Chart (Volume-Open-High-Low-Close).
• 2) Select only columns D-G and insert a second Stock Chart (Open-High-
Low-Close)
DATA VISUALIZATION - EXCEL
DATA VISUALIZATION - EXCEL
• Heat Maps
• Commonly used for:
• Visualizing trends or relationships using color scales
• Ex: accident rates by time of day and day of week
• Average temperature by city by month
• Average sentiment by hashtag
DATA VISUALIZATION - EXCEL
• Create a heat map to show the average temperature for each city based on month.
• Apply a Red-White-Blue Color Scale to column B to show cooler temperatures in blue and
hotter temperatures in red. When do temperatures start warming up, and when do they cool
back down?
• Apply a Green-White Color Scale to column C to show days with no/little precipitation in
white and days with a lot of precipitation in green. Which weeks had the highest precipitation
totals?
• BONUS: Apply a custom number format (;;;) to hide the text and only show the color scales.
DATA VISUALIZATION - EXCEL
• Surface and contours charts
• Commonly used for:
• Plotting data in three dimensions to find optimum combinations of values
• Ex: accident rates by time of day and day of week
• Elevation by latitude and longitude
• Cookie deliciousness by oven temperature and baking time
DATA VISUALIZATION - EXCEL
• Create a surface and contour map to show car accidents by day of week and
hour of day.
DATA VISUALIZATION - EXCEL
• Insert a 3-D Surface Chart to visualize the average temperature data in
columns A-M. Adjust the color formatting for each band to match the
example below, where cooler temperatures are shown in blue/green and
warmer temperatures are shown in yellow/orange/red (hint: bands can be
formatted by clicking on each item in the legend):
• Create a duplicate and change the
• chart type to a Contour Chart
DATA VISUALIZATION - EXCEL
• Spark Lines
• Commonly used for:
• Creating a trend for each row
DATA VISUALIZATION - EXCEL
• n column F, insert Sparklines as lines to show the accident totals by time of
day, with a marker to show the high point
• In row 9, insert Sparklines as columns to show the accident totals by day of
week, with a marker to show the high point
TABLEAU
Tableau can help anyone see and understand their data. Connect to almost
any database, drag and drop to create visualizations, and share with a click.
Transform data into actionable insights with tableau.
TABLEAU
• Connecting data in tableau
• There are two options
• Either connect to file
• Or connect to server
depending on the data
• Now we will connect to a excel
file
TABLEAU
• When you import, the screen looks like below
• Our source has 3 sheets