Skip to main content

E-commerce Analytics with SQL

SQL
Data analysis
Relational modeling and SQL from basic to advanced on ~100k Brazilian e-commerce orders, focused on business questions.

Problem

Answer business questions about sales, customers, deliveries and reviews using about 100,000 orders from the Olist e-commerce dataset.

Approach

Relational modeling of the dataset and progressively complex SQL queries, from simple aggregations to CTEs and window functions.

Technologies

SQL Relational modeling Python SQLite EXPLAIN QUERY PLAN RFM

Results

A 9-table model with primary and foreign keys and 30 versioned queries. Key findings: 17.6% of sellers account for 80% of revenue, and delivery delays only hurt reviews beyond 7 days (from 4.29 to 1.71 stars).

Back to top