This project involves creating a MySQL database for managing customer information, product details, and sales transactions for Kimia Farma. It also provides instructions for importing data from CSV files into the database, creating an aggregate table, and exporting data to a CSV file.
- Database Setup
- Importing Data
- Creating Aggregate Table
- Exporting Data
- SQL Data Analysis
- Tableau Data Visualization
- Create a new MySQL database named
kimia_farma
. - Use the newly created database:
USE kimia_farma
.
- Create the
customers
table using the provided SQL script. This table stores customer information. - Create the
products
table using the provided SQL script. This table stores product details. - Create the
sales
table using the provided SQL script. This table stores sales transaction information.
After creating the tables, you can import data from CSV files into each table using MySQL's Table Data Import Wizard or by running appropriate SQL commands.
- Create an aggregate table named
aggregate_table
by performing a LEFT JOIN operation on thesales
,customers
, andproducts
tables. This table will combine sales data with customer and product details. - Add a computed column named
total_sales
to theaggregate_table
. This column calculates the total sales amount for each transaction by multiplying thenumber_of_products
with theproduct_price
.
- Use MySQL's Table Data Export Wizard to export the
aggregate_table
data to a CSV file. Alternatively, you can run the SQL querySELECT * FROM aggregate_table
and then click Export. - The exported CSV file will contain the aggregated sales data along with customer and product information.
In addition to setting up the database structure and importing data, this project involves performing SQL data analysis on the collected data to gain valuable insights into the sales and customer behavior within Kimia Farma. The SQL data analysis queries are designed to extract meaningful information from the database and provide a deeper understanding of the business operations. Below is an overview of the key areas covered in the SQL data analysis:
This analysis helps in understanding the average sales revenue generated for each month, considering all the years. By grouping the data by month and calculating the average revenue, it becomes possible to identify patterns and trends in sales performance over time.
Identifying the top customers based on their total purchase value is crucial for recognizing the most valuable clients. This analysis ranks customers according to the sum of their total purchases, allowing you to pinpoint the highest revenue-generating customers.
The analysis of the top-selling products based on the total number of units sold provides insights into product popularity. By identifying the products that have the highest sales volume, businesses can focus on optimizing their inventory and marketing strategies.
Categorizing customers into different loyalty tiers based on their total purchase value offers a way to segment the customer base. This analysis assists in identifying loyal customers and tailoring marketing efforts to enhance customer retention.
Calculating the average product price for each brand aids in understanding brand positioning and pricing strategies. This analysis helps to compare the average prices of products from different brands.
Identifying the top revenue-generating dates helps in recognizing specific time periods with exceptional sales performance. This analysis allows businesses to plan and allocate resources effectively during peak sales periods.
Analyzing the number of distinct products purchased by each customer sheds light on customer buying behavior. It helps to identify customers who explore a variety of products and those who prefer specific items.
Calculating the average transaction value for each customer group provides insights into the spending patterns of different customer segments. It aids in understanding the revenue contribution of various customer groups.
These SQL data analysis queries provide a comprehensive understanding of sales trends, customer behavior, and product performance within the Kimia Farma sales ecosystem. By leveraging these insights, businesses can make informed decisions to optimize their operations, enhance customer experiences, and drive growth.
In this Tableau project, I designed a dynamic and insightful dashboard to visualize sales data for Kimia Farma, a pharmaceutical company. Leveraging Tableau's powerful features, I created compelling visualizations that provide a comprehensive understanding of sales performance, customer behavior, and product analysis.
-
Total Sales by Brand (Line Chart): I developed a line chart showcasing day-to-day total sales for each brand. This visualization allows for easy tracking of brand performance over time and highlights sales trends.
-
Average Price by Brand (Bar Chart): To analyze pricing strategies, I designed a bar chart illustrating the average price for each brand. This visualization aids in evaluating brand positioning and competitiveness in the market.
-
Items Sold per Product (Horizontal Bar Chart): I crafted a horizontal bar chart to display the number of items sold per product. This visualization identifies best-selling products and provides insights into demand patterns.
-
Total Sales per Customer (Treemaps): Using treemaps, I depicted total sales per customer group. This visualization helps identify key customer segments contributing to overall revenue and provides a hierarchical view of sales distribution.
The dashboard serves as a powerful tool for decision-makers to gain actionable insights into sales performance and customer trends. By combining multiple visualizations, I aimed to provide a comprehensive overview of the company's sales landscape, enabling informed business decisions.
Note: Make sure to replace placeholders such as file paths, table names, and column names with actual values according to your system configuration and project requirements.
For any issues or inquiries, feel free to contact the project contributors.
Project Contributors: [Muhammad Enrizky Brillian]