01 / E-COMMERCE · CASE STUDY

Target Brazil
E-commerce Analytics

An end-to-end customer, order and operational analytics case study using Google BigQuery, GoogleSQL and Looker Studio.

SQLBigQueryLooker StudioCustomer Analytics
Target Brazil E-commerce Analytics overview
THE BUSINESS QUESTION

What is happening across customers, orders and operations?

Is the underlying data complete and structurally reliable?
How does demand evolve across time and geography?
Who are the highest-value customer groups?
How do delivery, payment and review behaviour relate?
DATA MODEL & GRAIN CONTROL

Understand the data before writing the query.

The analysis starts from the relational model and controls analytical grain before customer- or order-level metrics are calculated.

TableRowsRole
customers99,441Customer master and geography
orders99,441Core order-level transaction grain
order_items112,650Products and seller-level order lines
payments103,886Payment method, value and installments
order_reviews99,224Customer review information
products32,951Product master
sellers3,095Seller master
geolocation1,000,163Geographic reference
Grain control matters. Order items and payment records can multiply rows when joined directly. They are aggregated to order level before being used in customer- or order-level metrics.
CUSTOMER ANALYTICS

97% of active customers were one-time buyers.

The customer analysis uses customer_unique_id to identify the underlying customer across potentially multiple customer_id records.

93,358Active customers
90,557One-time customers
2,801Repeat customers
R$15.42MObserved customer value
KEY INSIGHT97% of active customers made only one completed purchase.

One-time behaviour is not treated as confirmed churn because the dataset has a fixed observation end date.

Target Brazil customer overview dashboard
Customer Overview & Behaviour
Target Brazil customer value and RFM dashboard
Customer Value & RFM
VALUE CONCENTRATION & HIGH-VALUE PATHWAYS

Value is concentrated — but the pathway differs.

48.85% of customers account for 80% of observed customer value. High-value one-time customers tend to generate value through one high-ticket purchase, while high-value repeat customers reach similar observed value through multiple lower-value purchases.

21,586High-value one-time customers
1,771High-value repeat customers
R$390.63Avg. value — one-time
R$415.46Avg. value — repeat
Target Brazil high value customer pathways dashboard
High-Value Customer Pathways
Target Brazil recent high value customer profile dashboard
Recent High-Value Customer Profile
RECENT HIGH-VALUE CUSTOMER PROFILE

5,515 recent high-value one-time customers.

Defined using project-specific RFM thresholds: M4 observed customer value > ₹182.40, R4 last purchase within 163 days of 17 October 2018, and F1 exactly one completed order.

R$2.20MObserved customer value
R$399.30Average order value
61.24%SP + RJ + MG share
80.82%Single-item orders
93.82%Delivered before estimated date
79.87%Positive reviews
OPERATIONS & CUSTOMER EXPERIENCE

Delivery performance connects with the customer experience.

91.78%of delivered orders arrived before the estimated date.Average delivery variance: −11.16 days.
62.47%of late deliveries received bad reviews.Late deliveries also showed only 16.60% excellent reviews.

These are observed associations, not causal conclusions. State-level freight/delivery relationships and delivery/review relationships should not be interpreted as proof that one variable causes the other.

ANALYTICAL WORKFLOW

From relational data to business insight.

Data Model→Data Quality→GoogleSQL→Customer Analytics→Looker Studio→Business Insights

Tools

Google BigQuery · GoogleSQL · Looker Studio · GitHub

Deliverables

SQL phases · ER diagram · analytical views · customer datasets · four-section dashboard · detailed report

Limitations

Observation ends 17 October 2018; one-time behaviour is not confirmed churn; observed customer value is historical transaction value, not predicted CLV or profit.