The project contains the analysis of example sales data with SQL. The project showcase my knowledge and skils in SQL such as data manipulation, analysis and querying. The analysis was prepared with MS SQL Server database.
The dataset contains sample data about products sales. It includes three tables namely Customers, Products and Orders.
In the dataset asked the following questions:
- Based on the information about customers what is the distribution of customers by gender, age and cities?
- From which cities comes customers?
- Which customers are spent the most?
- What bought customers and how much they paid?
- What is the total quantity of each product sold?
- What is the average number of orders for each product?
- What is the top-selling products based on their total revenue?
- Which city brings in the most revenue?
- What is the revenue by gender?
- How is the ranking of the best customers?
- What is the average sales on each age group?
- What is the total number of products sold for each month?
SQL Skills Used:
- create tables and insert data,
- JOINS,
- aggregate functions,
- subqueries,
- window functions,
- common table expressions (CTE).
- script for create database - create_data.sql
- sales data analysis - data_analysis.sql
The project is created with:
- SQL (T-SQL),
- Microsoft SQL Server (SQL Server Management Studio).
Running the project:
To use this project:
- clone the repository or download .sql files;
- ensure you have a SQL database set up to execute the provided SQL code;
- use your chosen SQL client to execute the code snippets (e.g. SQL Server Management Studio, MySQL Workbench).