Skip to content

anas-bahi/sql-python-sales-data-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQL + Python Sales Data Analysis

Project Overview

This project demonstrates a complete data analysis workflow using Python and SQL. The goal of this project is to show how raw data can be stored in a database, queried using SQL, analyzed using Python, and visualized using charts.

This type of workflow is commonly used in real data analyst and data science jobs.

The project uses a sample sales dataset and performs database creation, SQL queries, data analysis, and visualization.


Objectives

The main objectives of this project are:

  • Practice working with real datasets
  • Learn how to store data in a SQL database
  • Use SQL queries to extract useful information
  • Analyze data using pandas
  • Visualize results using matplotlib
  • Organize a clean project for GitHub portfolio

This project is designed to demonstrate skills required for data analyst internships and entry-level jobs.


Tools and Technologies

  • Python 3
  • pandas
  • sqlite3
  • matplotlib
  • Git & GitHub

These tools are widely used in data analysis and machine learning projects.


Dataset

The dataset used in this project contains information about restaurant sales, including:

  • total bill
  • tip
  • gender
  • day
  • time
  • number of people

The dataset is stored as a CSV file and then imported into a SQL database.


Project Steps

1. Data Loading

The CSV file is loaded using pandas.

2. Database Creation

The data is stored in a SQLite database using sqlite3.

3. SQL Query

SQL queries are used to calculate statistics such as:

  • average bill per day
  • total sales per day

4. Data Analysis

The query results are loaded into pandas DataFrames.

5. Data Visualization

Matplotlib is used to create bar charts showing sales per day.

6. Version Control

The project is uploaded to GitHub to demonstrate project structure and code organization.


Project Structure

sql-python-sales-data-analysis/
│
├── tips.csv
├── database.py
├── query.py
├── analysis.py
├── sales.db
└── README.md

What I Learned

  • How to use Python for data analysis
  • How to create and use SQL databases
  • How to write SQL queries
  • How to visualize data using matplotlib
  • How to organize a data project
  • How to upload projects to GitHub

Why This Project Is Important

This project demonstrates real-world skills used by data analysts:

  • Data cleaning
  • SQL queries
  • Python analysis
  • Data visualization
  • Project organization

These skills are required in most data analyst, data science, and machine learning positions.


Bahi Anas

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages