Professional Documents
Culture Documents
01 02
SQL VISUALIZATION AND ANALYSIS
Write SQL queries Create a dashboard (in Tableau)
to display the information visually
to the decision maker
03
MODELLING
Create a fair scoring model for
salesmen and find the most and
least significant variables on
salesman performance
01
SQL
Write SQL queries
CHALLENGE
Get top 3 products with the highest total sales value in October 2020 in each
01 category. Show the category name, product name, and total sales value.
Total Sales Value = Order Value from delivered transaction (trx_state = ‘Delivered’).
03 FROM (
SELECT category.name AS category_name,
SUM(sales_order.order_value) AS sales_lost
FROM category
INNER JOIN product ON category.id = product.category_id
Calculate sales lost and sales lost INNER JOIN sales_order ON product.id = sales_order.product_id
rate of each category, sort by WHERE sales_order.trx_state='Cancelled'
sales lost descending. Show GROUP BY category_name) t1
category name, sales lost, and LEFT JOIN (
SELECT category.name AS category_name,
sales lost rate.
SUM(sales_order.order_value) AS sum_order
Sales lost = Order Value from FROM category
Cancelled Transactions. INNER JOIN product ON category.id = product.category_id
Sales Lost Rate = (Order value from INNER JOIN sales_order ON product.id = sales_order.product_id
cancelled transactions)/(Total GROUP BY category_name) t2
ON (t1.category_name = t2.category_name)
order value from all ORDER BY sales_lost DESC;
transactions)
02
VISUALIZATION AND
ANALYSIS
Create a dashboard (in Tableau) to display the
information visually to the decision maker
Challenge 1
Farah felt that the results of the
visualization were valid for comparing the
three apps. Do you agree with Farah? If you
agree, why? If you disagree, why and show
me a better way to compare the three apps
regardless of the numbers on the graph.