This repository contains SQL scripts and views for a comprehensive sales analytics data warehouse. It includes data model definitions and ETL transformations for customer and product dimensions, as well as fact tables. Key features: • Creation of stable dimensional views such as gold.dim_customers that consolidate and deduplicate customer data from multiple source tables using window functions. • Product-level aggregations incorporating sales metrics, order frequency, and product segmentation based on sales performance and recency. • Use of advanced SQL techniques including common table expressions (CTEs), window functions, and conditional logic for data transformation and summarization. • Support for data quality by eliminating duplicates via selecting latest records per customer and product. • Includes utilities for calculating customer age, customer lifetime value, product revenue analysis, and sales trends over time. • Designed to integrate smoothly into ETL pipelines with modular SQL blocks for easy maintenance and extension. This repository is ideal for data engineers, analysts, and developers focused on building robust and scalable business intelligence solutions using MySQL or compatible SQL platforms.
fedorkoondrej-bot/Data-Analysis-SQL
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|