GithubHelp home page GithubHelp logo

sales_insigths's Introduction

Sales Insights Data Analysis Project

Instructions to setup mysql on your local computer

  1. Follow step in this video to install mysql on your local computer https://www.youtube.com/watch?v=WuBcTJnIuzo

Data Analysis Using SQL

  1. Show all customer records

    SELECT * FROM customers;

  2. Show total number of customers

    SELECT count(*) FROM customers;

  3. Show transactions for Chennai market (market code for chennai is Mark001

    SELECT * FROM transactions where market_code='Mark001';

  4. Show distrinct product codes that were sold in chennai

    SELECT distinct product_code FROM transactions where market_code='Mark001';

  5. Show transactions where currency is US dollars

    SELECT * from transactions where currency="USD"

  6. 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;

  7. 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";

  8. 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");

  9. Show total revenue in year 2020 in Chennai

    SELECT SUM(transactions.sales_amount) FROM transactions INNER JOIN date ON transactions.order_date=date.date where date.year=2020 and transactions.market_code="Mark001";

Star Schema and Realtionships

A star schema is a type of database schema commonly used in data warehousing and business intelligence applications. It is designed to organize data into a logical structure that facilitates efficient querying and reporting. The star schema consists of a central fact table linked to one or more dimension tables, forming a pattern that resembles a star when visualized. Here are the key components of a star schema:

Fact Table:Central to the schema, the fact table contains quantitative data (facts) that can be aggregated. This data is typically numerical and represents business metrics such as sales, revenue, quantity, etc. Each row in the fact table corresponds to a specific event or transaction and includes foreign keys that link to the dimension tables.

Dimension Tables:Surrounding the fact table are dimension tables, which contain descriptive attributes that provide context to the data in the fact table. Each dimension table corresponds to a category or aspect of the business, such as time, geography, product, or customer. Dimension tables are connected to the fact table through foreign key relationships.

The star schema is called so because, when visualized, the structure resembles a star with the fact table at the center and dimension tables radiating outwards. This design simplifies queries by allowing users to easily join the fact table with one or more dimension tables to retrieve relevant information. The schema is denormalized, meaning that redundant data is often included in dimension tables to minimize the need for complex joins and improve query performance.

Star_schema

Demo Images

Mobile layout

mobile

Dashboard

DashBoard_page 1

Dashboard_page2

Demo Video

2023-11-29.11-19-27.mp4

sales_insigths's People

Contributors

vedant478 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.