Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Sales Insights Data Analysis Project


#Instructions to setup mysql on your local computer

  1. SQL database dump is in db_dump.sql file. Download db_dump.sql file to your local computer and import it to SQL database.

Data Analysis Using SQL

  1. Show all customer records
SELECT * FROM customers;
  1. Show total number of customers
SELECT count(*) FROM customers;
  1. Show transactions for Chennai market (market code for chennai is Mark001
SELECT * FROM transactions where market_code='Mark001';
  1. Show distrinct product codes that were sold in chennai
SELECT distinct product_code FROM transactions where market_code='Mark001';
  1. Show transactions where currency is US dollars
SELECT * from transactions where currency="USD"
  1. Show transactions in 2020 join by date table
SELECT transactions.*, date.* FROM transactions INNER JOIN date ON transactions.order_date=date.date where date.year=2020;
  1. Show total revenue in year 2020,
SELECT SUM(transactions.sales_amount) FROM transactions INNER JOIN date ON transactions.order_date=date.date where date.year=2020 and transactions.currency="INR\r" or transactions.currency="USD\r";
  1. Show total revenue in year 2020, January Month,
SELECT SUM(transactions.sales_amount) FROM transactions INNER JOIN date ON transactions.order_date=date.date where date.year=2020 and and date.month_name="January" and (transactions.currency="INR\r" or transactions.currency="USD\r");
  1. Show total revenue in year 2020 in Chennai

Data Analysis Using Power BI


  1. Formula to create norm_amount column
= Table.AddColumn(#"Filtered Rows", "norm_amount", each if [currency] = "USD" or [currency] ="USD#(cr)" then [sales_amount]*75 else [sales_amount], type any)

About

Compilation of SQL programming codes and Data Analysis Using Power BI.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors