Skip to content

This task focuses on analyzing monthly sales trends using SQL queries on the online_sales dataset. The goal is to extract meaningful business insights by calculating the total revenue and number of orders placed each month.

Notifications You must be signed in to change notification settings

prachee01/Sales-Trend-Analysis-Using-SQL-Aggregations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Sales-Trend-Analysis-Using-SQL-Aggregations

This task focuses on analyzing monthly sales trends using SQL queries on the online_sales dataset. The goal is to extract meaningful business insights by calculating the total revenue and number of orders placed each month. πŸ“Š Task 6: Sales Trend Analysis Using Aggregations

πŸ“ Overview

This task aims to perform Sales Trend Analysis using SQL to understand monthly trends in revenue and order volume. The objective is to group transactional data by month and year, apply aggregations like SUM() and COUNT(), and sort the results for insightful visualization.


πŸ”§ Tools Used

Database: PostgreSQL / MySQL / SQLite

Language: SQL

Output Format: PDF

Key SQL Functions Used:

EXTRACT(YEAR FROM order_date)

EXTRACT(MONTH FROM order_date)

SUM(amount)

COUNT(DISTINCT order_id)

GROUP BY, ORDER BY


πŸ“ Files Included

File Name Description

TASK_6_Sales_Trend_Analysis.pdf Final report including SQL script and sample results table README.md (this file) Project description, tools, and instructions


🧾 SQL Script Summary

The SQL script performs the following:

Extracts the year and month from each order's order_date.

Aggregates the total revenue using SUM(amount).

Counts unique orders using COUNT(DISTINCT order_id).

Groups the data by year and month to observe trends.

Sorts the final output by chronological order.


πŸ“Š Sample Output Table

Year Month Total Revenue Total Orders

2023 1 INR 1,25,000 230 2023 2 INR 1,45,500 280 2023 3 INR 1,67,200 310 2023 4 INR 1,80,000 340


πŸ“Œ Learning Outcome

Through this task, I have:

Learned how to group data using date parts (month, year).

Used aggregate functions like SUM() and COUNT() to generate business insights.

Gained confidence in writing clean and optimized SQL queries for reporting purposes.

Understood how to present SQL output in a professional PDF format for stakeholders.

πŸ’Ό Author

*Prachee *

About

This task focuses on analyzing monthly sales trends using SQL queries on the online_sales dataset. The goal is to extract meaningful business insights by calculating the total revenue and number of orders placed each month.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published