Delhivery Data Analytics Interview Questions & Answers
Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Delhivery hiring for Data Analytics roles
Delhivery is an Indian logistics and supply chain company that provides parcel delivery, freight, warehousing and fulfilment services for e-commerce and enterprise clients. It runs a large network of hubs and uses technology for route planning, tracking and automation. It hires software engineers, data scientists, data analysts and operations professionals.
For Data Analytics roles, this Delhivery practice set focuses most on Python for Analysis (7), Web & Marketing Analytics (5), Data Cleaning (4), SQL (4). It has 1 easy, 31 medium, 8 hard questions, so you can start easy and work up to the harder ones.
Company type
E-commerce & consumer tech
Headquarters
Gurugram, India
Main India offices
Gurugram, Bengaluru
Delhivery Data Analytics interview process
Online coding or analytics assessment
Technical round 1
Technical round 2 (design or case)
Hiring manager round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for DelhiveryStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
✓ 3 questions free • Unlock the rest in seconds
01
How do you handle a dataset with 30% missing values in a key column?
Understand why it is missing, consider imputation or a missing flag, test sensitivity, and talk to data owners about fixing collection if it is systematic.
02
Write Python code to test whether conversion differs between control and treatment.
from statsmodels.stats.proportion import proportions_ztest, proportion_confint
conversions = [1180, 1295] # control, treatment
visitors = [30000, 30100]
z, p = proportions_ztest(conversions, visitors)
print(f'z = {z:.2f}, p = {p:.4f}')
for c, n in zip(conversions, visitors):
low, high = proportion_confint(c, n, method='wilson')
print(f'rate {c/n:.3%} 95% CI {low:.3%} to {high:.3%}')
03
How do you pivot rows into columns in SQL, for example sales by quarter as columns?
SELECT region,
SUM(CASE WHEN quarter = 'Q1' THEN amount ELSE 0 END) AS q1,
SUM(CASE WHEN quarter = 'Q2' THEN amount ELSE 0 END) AS q2,
SUM(CASE WHEN quarter = 'Q3' THEN amount ELSE 0 END) AS q3,
SUM(CASE WHEN quarter = 'Q4' THEN amount ELSE 0 END) AS q4
FROM sales
GROUP BY region;
-- conditional aggregation works in every database; some also offer PIVOT
04
Traffic suddenly doubled from one city, with near-zero engagement time and no conversions. What is happening and what do you do?
This is very likely bot or spam traffic, or a misfiring tag. Check the user agents, IP ranges, hostnames, screen resolutions and landing pages for that traffic. If it is bots, exclude it with filters or data segments in analytics and in your reporting layer, and inform the web team so they can block it. Then restate the affected dashboard numbers, because bots inflate sessions and pull down conversion rate.
Use a star schema, remove unused columns, prefer measures, reduce visuals per page, limit high-cardinality fields and use aggregations or incremental refresh.
06
A stakeholder says the Power BI report shows different revenue than their Excel file. How do you troubleshoot?
I would first agree on definitions: gross or net, including tax or returns, order date or invoice date. Then compare one small slice, such as one month and one region, in both. I check filters on the report and page, relationships that drop unmatched rows, refresh time versus the Excel extract time, and duplicate rows. Once the gap is explained, I document the definition in the report so the question does not repeat.
07
Your scheduled Python report failed silently and nobody noticed for a week. How do you make it reliable?
Add logging to a file or central log, wrap the main steps in try and except that send an alert by email or chat on failure, and exit with a non-zero code so the scheduler marks the job failed. Add data checks, such as row counts above a minimum and no missing dates, before sending output. Use a proper scheduler or orchestrator with retries, and include the data date in every report.
import re
pattern = re.compile(r'(?:\+?91[\s-]?|0)?([6-9]\d{9})')
def get_mobile(text):
if not isinstance(text, str):
return None
digits = re.sub(r'[\s()-]', '', text)
m = pattern.search(digits)
return m.group(1) if m else None
df['mobile'] = df['contact'].apply(get_mobile)
10
Email open rates suddenly jumped from 22% to 45% without any campaign change. Should you celebrate?
No. Privacy features in some mail apps pre-load email images, which fires the open tracking pixel even if the person never reads the email, so open rates get inflated. Check opens by email client to confirm. Move reporting towards clicks, click-to-send rate, conversions and unsubscribes, which reflect real behaviour, and avoid using opens alone to pick winning subject lines or to define engaged subscribers.
A context filter is applied before other dimension filters and before FIXED LOD calculations, creating a smaller dataset the rest of the view works on. Use it when a Top N filter should operate within a selected category, for example top 10 products within Electronics, or when a FIXED LOD must respect a filter. Add a filter to context from its right-click menu; it turns grey. Too many context filters can hurt performance.
13
What is the grain of a fact table and why should you decide it first?
The grain is the exact meaning of one row in a fact table, such as one order line, one daily store total or one monthly account balance. You decide it first because it controls which dimensions can join, which measures are valid and how totals behave. Mixing grains in one table, for example order lines and order-level shipping charges, causes double counting. Always state the grain in one sentence before adding columns.
14
A retail chain asks you which of its 120 stores it should close. How do you approach it?
Clarify the goal first: profit, cash or market share. Build a store-level dataset with revenue, contribution margin after rent and staff, trend over 24 months, footfall, catchment demographics and cannibalisation with nearby stores. Separate structural losers from stores that are new or temporarily disrupted. Estimate how much revenue would shift to nearby stores or online if a store closes. Present a shortlist with scenarios and risks, not a single answer.
Visually with a box plot, with the IQR rule (below Q1 − 1.5×IQR or above Q3 + 1.5×IQR) or a z-score above 3. Then decide with the business whether to cap, remove or keep them.
17
You must present to the sales team that they missed their quarterly target by 18%. How do you handle it?
Lead with the fact clearly, then show where the gap came from, such as which regions, products or deal stages, so it becomes actionable rather than a blame session. Separate controllable causes like lower conversion from uncontrollable ones like a delayed product launch. Highlight what did work, and end with two or three specific actions and the metrics to track them. Share the numbers with sales leaders privately first, to avoid surprises.
18
What is the difference between frequentist and Bayesian A/B testing?
Frequentist testing asks how surprising the data would be if there were no difference, and gives p-values and confidence intervals with a fixed sample size. Bayesian testing combines a prior with the data to give a probability that treatment beats control and the expected loss of choosing it. Bayesian results are easier for business users to read, but still depend on priors and still need sensible stopping rules.
19
Write SQL to calculate monthly customer churn rate.
WITH active AS (
SELECT DISTINCT customer_id,
DATE_TRUNC('month', order_date) AS month
FROM orders
)
SELECT a.month,
COUNT(*) AS active_customers,
COUNT(*) - COUNT(n.customer_id) AS churned_next_month,
ROUND(100.0 * (COUNT(*) - COUNT(n.customer_id)) / COUNT(*), 1) AS churn_pct
FROM active a
LEFT JOIN active n
ON n.customer_id = a.customer_id
AND n.month = a.month + INTERVAL '1 month'
GROUP BY a.month
ORDER BY a.month;
20
Write a DAX measure for a KPI card showing achievement against target and a colour for conditional formatting.
Achievement % =
DIVIDE([Total Sales], [Sales Target])
KPI Colour =
VAR a = [Achievement %]
RETURN
SWITCH(
TRUE(),
ISBLANK(a), "#9E9E9E",
a >= 1, "#2E7D32",
a >= 0.9, "#F9A825",
"#C62828"
)
-- apply KPI Colour via Format > Callout value > fx > Field value
A bus matrix is a planning grid with business processes as rows, such as orders, shipments and returns, and conformed dimensions as columns, such as date, customer, product and warehouse. A tick shows which dimensions each process uses. It helps prioritise which fact tables to build, shows which dimensions must be shared and conformed first, and gives leaders a one-page roadmap of the warehouse without technical detail.
22
What is the LAMBDA function in Excel and when would you use it?
LAMBDA lets you write a custom, reusable function with formulas only, no VBA. You define it, for example =LAMBDA(price, rate, price*(1+rate)), and save it in the Name Manager as AddGST, then call =AddGST(B2, 18%) anywhere. Helper functions like MAP, REDUCE, SCAN and BYROW pair with it for array logic. Use it when a complex calculation repeats across a workbook, so the logic lives in one tested place.
23
You loaded a month of sales into the warehouse. How do you check the load is complete and correct?
Reconcile against the source: compare row counts, total amount, and counts by day and by store between source and target. Check for duplicate keys, nulls in mandatory columns, and dates outside the expected month. Compare with the previous month to spot big unexplained jumps. Spot-check a few individual transactions end to end. Automate these checks so each future load produces a small pass or fail report.
24
Tell me about a time you worked with a marketing team to improve a campaign using data.
Situation: a lead generation campaign had a high cost per lead and sales said leads were poor. Task: find what to change. Action: I joined ad data with CRM outcomes and found two audience segments produced most leads but almost no closed deals, while one smaller segment converted well. Result: we moved budget to that segment and changed the form questions; cost per qualified lead fell about 30% in six weeks.
25
Write pandas code to fill missing values in a column with the median of each group.
# Fill missing delivery_days with the median for that city
df['delivery_days'] = (
df['delivery_days']
.fillna(df.groupby('city')['delivery_days'].transform('median'))
)
# Rows in a city with no values at all stay NaN; fall back to overall median
df['delivery_days'] = df['delivery_days'].fillna(df['delivery_days'].median())
26
Write pandas code for a pivot table of sales by region and category with sum and count.
SELECT category,
SUM(amount) AS revenue,
ROUND(100.0 * SUM(amount)
/ SUM(SUM(amount)) OVER (), 2) AS pct_share
FROM sales
GROUP BY category
ORDER BY revenue DESC;
-- SUM(SUM(amount)) OVER () is the grand total across all groups
28
What does apply do in pandas and why can it be slow?
apply runs a Python function on each row or column of a DataFrame, or each value of a Series. It is flexible but slow on large data because it loops in Python rather than using optimised C code. For example, df['total'] = df['qty'] * df['price'] is far faster than an apply with a lambda. Prefer vectorised operations, np.where, np.select, map with a dictionary, or string accessor methods first.
Confirm data accuracy first → break down by region, product, channel and customer segment → compare with seasonality and last year → check pricing, stock-outs, marketing changes and funnel conversion → present the root causes with clear charts.
31
Write Python code to extract UTM source, medium and campaign from a column of landing page URLs.
The Data Model is an in-memory columnar store inside Excel that holds several related tables, and Power Pivot is the interface to manage it. Instead of flattening data with VLOOKUPs, you load fact and dimension tables, create relationships and write DAX measures. It handles millions of rows that would not fit on a sheet, and PivotTables built on it can slice across tables. It is the same engine idea that Power BI uses.
33
Write SQL to generate a simple date dimension for 2026.
-- PostgreSQL syntax
CREATE TABLE dim_date AS
SELECT
TO_CHAR(d, 'YYYYMMDD')::INT AS date_key,
d::DATE AS full_date,
EXTRACT(YEAR FROM d) AS year,
EXTRACT(QUARTER FROM d) AS quarter,
EXTRACT(MONTH FROM d) AS month_no,
TO_CHAR(d, 'Mon') AS month_name,
TO_CHAR(d, 'Dy') AS weekday,
EXTRACT(ISODOW FROM d) IN (6, 7) AS is_weekend
FROM GENERATE_SERIES(DATE '2026-01-01', DATE '2026-12-31', INTERVAL '1 day') AS d;
34
Tell me about a time you handled a request for access to sensitive data.
Situation: a regional manager asked for a salary-level export of all employees to plan hiring. Task: help without breaking data policy. Action: I clarified the actual need, which was headcount cost by grade and location, checked with HR on access rules, and built a Power BI view with aggregated costs and row-level security limiting each manager to their region. Result: the manager got what was needed and no individual salaries were exposed.
35
Write a Tableau calculation to find each customer's first purchase date and flag new versus repeat orders.
// First Purchase Date
{ FIXED [Customer ID] : MIN([Order Date]) }
// Order Type
IF [Order Date] = [First Purchase Date]
THEN 'New'
ELSE 'Repeat'
END
// Cohort Month for retention analysis
DATETRUNC('month', [First Purchase Date])
36
Your pandas script takes 40 minutes on 10 million rows. How do you speed it up?
First profile to find the slow step instead of guessing. Common fixes: replace row-wise apply and loops with vectorised operations, convert repeated strings to category dtype, downcast numeric types, read only needed columns with usecols, and filter early. Push heavy joins and aggregations into SQL. If it is still slow, use a columnar engine such as DuckDB or Polars, or store intermediate data as Parquet instead of CSV.
IN checks whether a value is in a list or subquery result; EXISTS checks whether a subquery returns at least one row and stops at the first match. Results are the same in most cases, and modern optimisers often run them similarly. The big difference is NOT IN with NULLs: if the subquery returns any NULL, NOT IN returns no rows. NOT EXISTS behaves correctly, so prefer it for anti-joins.
39
Site conversion rate rose from 2.0% to 2.4%, but total revenue stayed flat. What would you check?
Check the components: sessions may have fallen, for example after cutting paid campaigns, which removes low-intent traffic and lifts the rate without new sales. Average order value may have dropped because of discounts or a mix shift towards cheaper products. Also check whether conversion definitions or tracking changed. Revenue equals sessions times conversion rate times AOV, so break down the change across those three factors by channel.
40
What is the difference between dimensions and measures in Tableau?
Dimensions are qualitative fields such as region, product or date that slice data into groups and create headers. Measures are quantitative fields such as sales or profit that get aggregated, by default with SUM. Dragging a dimension to rows creates one row per member; dragging a measure creates an axis. A numeric field like customer ID should be converted to a dimension so it is not summed.
Tips to crack the Delhivery Data Analytics interview
Learn logistics basics such as first mile, last mile, hub operations and shipment tracking to discuss the domain.
Practise optimisation-style problems and graph algorithms, which connect well to routing and network planning work.
For analyst roles, revise SQL and Excel, and prepare to analyse delivery delays or cost per shipment in a case.
Keep a one-minute story ready for every project on your CV: problem, your part, tools, result.
Practise the hard questions on this page aloud; Delhivery interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Delhivery Data Analytics interview?
Candidates usually go through 4 stages: Online coding or analytics assessment; Technical round 1; Technical round 2 (design or case); Hiring manager round. The exact rounds change with the role, team, location and your experience, so confirm the process with the recruiter.
Which topics should I prepare for the Delhivery Data Analytics interview?
This practice set leans on Python for Analysis (7), Web & Marketing Analytics (5), Data Cleaning (4), SQL (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Delhivery interviewers ask you to walk through real work.
Are these the exact questions asked at Delhivery?
No. These are curated practice questions that match the skills and difficulty usually tested in e-commerce & consumer tech interviews like Delhivery's. They are not a leaked or verified list of past questions.
Where does Delhivery hire Data Analytics professionals in India?
Delhivery has large teams in Gurugram, Bengaluru. Openings and locations change often, so check the Delhivery careers page and filter by city and experience.