Customer & Sales Analytics
Querying transactional sales data in SQL, then modelling it in Power BI to surface who buys, what sells, and where revenue is trending.
- Role
- Data Analyst
- Focus
- Segmentation & reporting
- Query layer
- SQL
- Reporting
- Power BI
Overview
Transactional sales data answers useful questions only after it has been joined to the customer and product records that give it meaning. On its own, a line-item table records that an order happened — not who placed it, whether they had bought before, or which product line it belonged to.
This project handles the aggregation in SQL, then hands a clean result to Power BI for modelling and presentation — each tool doing the part it is genuinely better at.
Querying in SQL
The query layer joins transactional sales records to customer and product tables, then aggregates to the grain each question requires — per customer, per product, per period.
- Joined sales line items to customer and product dimensions
- Aggregated revenue and order counts across multiple grains
- Filtered and grouped to isolate the segments worth reporting on
Customer segmentation
With customers grouped by purchasing behaviour — how much they spend, how often they order, what they buy — the business can separate its highest-value relationships from occasional buyers and treat the two differently.
Revenue trends and product performance
Revenue is tracked over time to expose direction and seasonality, and broken down by product to identify which lines carry the business. Together these answer the two questions behind most commercial decisions: where is revenue heading, and which products are driving it.
Reporting in Power BI
The modelled result is presented in Power BI so stakeholders can filter and drill for themselves rather than requesting a new extract each time a question comes up — which is the difference between a report and an analysis someone actually uses.
What the analysis showed
- Aggregating in SQL before it reaches the BI layer keeps the report responsive and the logic reviewable.
- Segmentation turns an undifferentiated customer list into groups the business can act on.
- Revenue trend and product mix answer different questions and both are needed to plan.
- Self-serve filtering removes the analyst from the loop on routine questions.