Skip to content

Commit 11c0fe9

Browse files
committed
added readme
0 parents  commit 11c0fe9

File tree

2 files changed

+220
-0
lines changed

2 files changed

+220
-0
lines changed

1_SalesInsights/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
## Sales Insights Data Analysis Project
2+
3+
### Instructions to setup mysql on your local computer
4+
5+
1. Follow step in this video to install mysql on your local computer
6+
https://www.youtube.com/watch?v=WuBcTJnIuzo
7+
8+
1. SQL database dump is located [here](). Download `db_dump.sql` file to your local computer and import it as per instructions given in the tutorial video
9+
10+
### Data Analysis Using SQL
11+
12+
1. Show all customer records
13+
14+
`SELECT * FROM sales.customers;`
15+
16+
1. Show total number of customers
17+
18+
`SELECT count(*) FROM sales.customers;`
19+
20+
1. Show transactions for Chennai market (market code for chennai is Mark001
21+
22+
`SELECT * FROM sales.transactions where market_code='Mark001';`
23+
24+
1. Show distrinct product codes that were sold in chennai
25+
26+
`SELECT distinct product_code FROM sales.transactions where market_code='Mark001';`
27+
28+
1. Show transactions where currency is US dollars
29+
30+
`SELECT * from sales.transactions where currency="USD"`
31+
32+
1. Show transactions in 2020 join by date table
33+
34+
`SELECT sales.transactions.*, sales.date.* FROM sales.transactions INNER JOIN sales.date ON sales.transactions.order_date=sales.date.date where sales.date.year=2020;`
35+
36+
1. Show total revenue in year 2020,
37+
38+
`SELECT SUM(sales.transactions.sales_amount) FROM sales.transactions INNER JOIN sales.date ON sales.transactions.order_date=sales.date.date where sales.date.year=2020;`
39+
40+
1. Show total revenue in year 2020 in Chennai
41+
42+
`SELECT SUM(sales.transactions.sales_amount) FROM sales.transactions INNER JOIN sales.date ON sales.transactions.order_date=sales.date.date where sales.date.year=2020
43+
and sales.transactions.market_code="Mark001";`
44+
45+
46+
Data Analysis Using Power BI
47+
============================
48+
49+
1. Formula to create norm_amount column
50+
51+
`= Table.AddColumn(#"Filtered Rows", "norm_amount", each if [currency] = "USD" or [currency] ="USD#(cr)" then [sales_amount]*75 else [sales_amount], type any)`
52+
53+
54+

1_SalesInsights/db_dump.sql

Lines changed: 166 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)