An open API service indexing awesome lists of open source software.

https://github.com/sinhasomya100/task-7

Get Basic Sales Summary from a Tiny SQLite Database using Python
https://github.com/sinhasomya100/task-7

jupiter-notebook matplotlib pandas python3 sqlite3

Last synced: 3 months ago
JSON representation

Get Basic Sales Summary from a Tiny SQLite Database using Python

Awesome Lists containing this project

README

          

# 📦 Task-7 – Get Basic Sales Summary from a Tiny SQLite Database using Python
---

## 📊 Sales Data Analysis with Python & SQLite

This project demonstrates how to use **Python**, **SQLite**, **SQL queries**, and **Matplotlib** to analyze and visualize sales data directly from a database.

---
| File Name | Description |
|---------------------------------------|-----------------------------------------------------|
| `TASK 7 DA [1]` | Internship task description for Task 8 |
| `Task_7_Sales_Analysis_ipynb.ipynb` | Jupiter Notebook file on google collab |
| `TASK 7th.pdf` | Step by Step Summary with ouputs |
| `Interview Q/A` | Interview Q/A |
| `README.md` | Overview and documentation of the project |
| `png2pdf.pdf` |Summary of Task 7 using Canva |

---
## 📁 Project Overview

- Created a **SQLite database** with a `sales` table
- Inserted **sample sales data** (products, quantity, price)
- Ran SQL queries inside Python to get:
- ✅ Total quantity sold
- ✅ Total revenue
- ✅ Revenue by product
- Visualized results using **Matplotlib bar chart**
- Displayed summary in a neat table using **pandas**

---

## 📦 Technologies Used

- Python 3.x
- SQLite (with `sqlite3` module)
- SQL (`GROUP BY`, `SUM`)
- pandas
- matplotlib

---

## 📑 Steps Performed in the Notebook

-- Connected to SQLite database using Python
![image](https://github.com/user-attachments/assets/ca49fdd3-a008-4d3a-8dd0-38b606fa51ee)
![image](https://github.com/user-attachments/assets/59070d3e-d821-433f-a912-78e8adbd404f)
![image](https://github.com/user-attachments/assets/03d54d52-5b5c-45c0-8b95-7175987a446a)

---

--Executed SQL query to fetch product-wise total quantity and revenue
![image](https://github.com/user-attachments/assets/70b302db-720c-4f11-b836-9e05cdbe1960)
![image](https://github.com/user-attachments/assets/d566523a-05d0-488b-9f91-77b861f29f91)

---


--Loaded SQL result into pandas

--Plotted a charts using matplotlib

![image](https://github.com/user-attachments/assets/75882d00-1419-40a6-9904-ff14fde3d499)
![image](https://github.com/user-attachments/assets/b71e3080-a23a-43e3-867e-effe0f662789)

--Summary table

![image](https://github.com/user-attachments/assets/2370c12e-e36c-4162-8366-2372a4688958)

---
💡 What I Learnt
-Connecting Python with SQLite databases

-Writing and running SQL queries inside Python

-Performing aggregation with GROUP BY

-Using pandas for tabular data handling

---

📬 Contact
If you have any questions, feel free to reach out:
https://www.linkedin.com/posts/activity-7321762537123782656-d6jB?utm_source=share&utm_medium=member_desktop&rcm=ACoAADazOB0BRuax1fAhu4L7QyodlFZtYz-UgyU