Lenskart Data Analytics Interview Questions & Answers
Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Lenskart hiring for Data Analytics roles
Lenskart is an Indian eyewear company that sells spectacles, sunglasses and contact lenses through its website, app and a large chain of retail stores. It combines online shopping with home eye tests, virtual try-on technology and in-house manufacturing. It hires software engineers, data analysts, product managers and retail and operations roles across its technology and business teams.
For Data Analytics roles, this Lenskart practice set focuses most on Python for Analysis (7), Tableau (6), SQL (6), Data Storytelling (4). It has 3 easy, 27 medium, 10 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
Lenskart Data Analytics interview process
Online coding or analytics assessment
Technical round
Case or managerial round
HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for LenskartStart 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
Your pandas script shows SettingWithCopyWarning and a new column does not update. What is happening and how do you fix it?
It warns that you may be modifying a temporary copy of a slice, so the change might not reach the original DataFrame, for example df[df.sales > 0]['flag'] = 1. Avoid it by using a single loc call, df.loc[df.sales > 0, 'flag'] = 1, or by calling .copy() when you intentionally create a new subset. Newer pandas versions with copy-on-write make behaviour more predictable, but clear loc assignments remain best practice.
02
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.
03
Analytics shows 1,820 purchases last month but the order database shows 2,150. Which is right, and how do you explain the gap?
The order database is the source of truth for counts and revenue. Analytics usually undercounts because of ad blockers, declined cookie consent, users closing the page before the confirmation tag fires, and payment redirects that break sessions. It can also overcount from duplicate tags on page refresh. Quantify the gap per month; if it is stable around 15%, use analytics for channel mix and trends and the database for totals.
04
Your Top 10 products filter in Tableau ignores the category filter. Why, and how do you fix it?
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.
Table calculations are computed on the aggregated results already in the view, not on the underlying rows. Examples are running total, percent of total, difference from previous, rank and moving average. Their result depends on the direction and partition you set with Compute Using, for example table across or by specific dimensions. They are quick to add from Quick Table Calculation, but incorrect Compute Using settings are a frequent cause of wrong numbers.
06
A report filters WHERE order_date = '2026-03-31' and misses almost all orders from that day. Why?
order_date is probably a DATETIME or TIMESTAMP column, so the filter matches only rows at exactly midnight, 2026-03-31 00:00:00. Use a half-open range instead: WHERE order_date >= '2026-03-31' AND order_date < '2026-04-01'. This keeps the index usable, unlike wrapping the column in CAST or DATE(), and it correctly includes orders at 23:59:59.500. Also check the time zone of the stored timestamps.
07
A file has dates in mixed formats, some dd/mm/yyyy and some mm/dd/yyyy. How do you handle it?
Find out which system or region produced each format, since a source column often explains it. Values with a day above 12 reveal the format unambiguously. Parse with an explicit format per source, for example pd.to_datetime(col, format='%d/%m/%Y', errors='coerce'), rather than letting the tool guess. Check failed or suspicious parses, such as future dates, and ask the source team to send ISO format yyyy-mm-dd going forward.
Incrementality testing measures sales that happened because of a campaign, compared with what would have happened anyway. You hold out a random group of users or a set of matched cities from the campaign and compare their conversions with the exposed group. Attribution tools often over-credit channels like retargeting and brand search, which reach people already likely to buy, so incrementality tests show the true lift and the true cost per incremental sale.
09
Write Python code for a simple difference-in-differences estimate of a store pilot.
A Common Table Expression (WITH name AS (...)) is a named temporary result used inside one query. Use it to break complex logic into readable steps or for recursive queries.
Start with the Performance Recorder to see whether time goes into queries, calculations or rendering. Then reduce work: use an extract with only needed columns and rows, aggregate it to the dashboard's grain, and hide unused fields. Cut the number of sheets and high-mark-count views, replace many quick filters with fewer or with action filters, and avoid show only relevant values. Simplify heavy string and LOD calculations or move them to the database.
15
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.
16
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.
17
Write a DAX measure for year-over-year sales growth percentage.
Sales LY =
CALCULATE([Total Sales], SAMEPERIODLASTYEAR('Date'[Date]))
Sales YoY % =
VAR cur = [Total Sales]
VAR prev = [Sales LY]
RETURN
DIVIDE(cur - prev, prev)
-- needs a marked date table; format the measure as a percentage
18
Write pandas code to find the top 2 products by revenue in each region.
A bridge table resolves a many-to-many relationship between a fact and a dimension. For example, one bank account can have several holders and one customer can hold several accounts, so a bridge table stores account_key, customer_key and often an allocation weight. Without it, joining facts to customers duplicates amounts. Use weights to split balances, or report clearly that totals across customers will exceed the true total.
20
Write SQL to find the top 3 products by revenue within each category.
WITH ranked AS (
SELECT category,
product,
SUM(amount) AS revenue,
DENSE_RANK() OVER (
PARTITION BY category
ORDER BY SUM(amount) DESC
) AS rnk
FROM sales
GROUP BY category, product
)
SELECT category, product, revenue
FROM ranked
WHERE rnk <= 3
ORDER BY category, rnk;
Data storytelling is communicating insights by combining three things: data, the evidence; visuals, charts that make patterns obvious; and narrative, the context and so-what that explains why it matters and what to do. A table of numbers informs, but a story persuades someone to act. For an analyst, it means leading with the key finding, showing just enough evidence, and ending with a clear recommendation.
22
Write a Tableau calculated field that keeps only sales from the last 30 days.
// Calculated field: Last 30 Days Flag
DATEDIFF('day', [Order Date], TODAY()) <= 29
AND [Order Date] <= TODAY()
// Put this field on Filters and keep True.
// For a sales measure instead of a filter:
// IF DATEDIFF('day', [Order Date], TODAY()) <= 29 THEN [Sales] END
23
How do you handle large CSV files that do not fit in memory in Python?
// Profit Ratio (aggregate first, then divide)
SUM([Profit]) / SUM([Sales])
// Profit Category
IF SUM([Profit]) < 0 THEN 'Loss'
ELSEIF [Profit Ratio] < 0.1 THEN 'Low margin'
ELSE 'Healthy'
END
// avoid AVG([Profit]/[Sales]): it averages row ratios and gives a wrong total
25
A stakeholder wants 20 more visuals added to an already crowded dashboard page. How do you respond?
I would ask which decisions each new visual supports and how often they will look at it. Usually a few are essential and the rest are nice to have. I would propose keeping the main page focused on core KPIs and moving detail into drill-through pages, tooltips or a separate analysis tab. Showing a quick mock-up of both versions helps them see that the cleaner page answers questions faster.
26
On day 4 of a planned 14-day test, the product manager wants to stop because the dashboard shows treatment winning. What do you say?
I would explain that early results swing a lot and stopping on a good day inflates false positives, and that four days miss weekly patterns like weekend shopping. I would show how the lift has moved day by day and agree to the planned end date. If speed really matters, we can agree a sequential testing rule for future tests, but changing the rule mid-test after seeing data is not valid.
27
The customer table has near-duplicates like 'Rahul Sharma, 98xxxx1234' and 'Rahul Sharma, +91 98xxxx1234'. How do you deduplicate?
First normalise: trim and lower-case names, collapse spaces, and strip country codes and symbols from phones and emails. Then match on strong keys such as phone or email. For remaining records use fuzzy matching on names with a similarity score, restricted to the same city or pin code to limit comparisons. Review borderline scores manually, keep a mapping from old IDs to a master ID, and fix entry at the source.
28
Many reporting queries in your team use SELECT DISTINCT to remove duplicate rows. What is the risk?
SELECT DISTINCT often hides a real problem, such as a join on the wrong key or a one-to-many join that multiplies rows. The output looks clean, but sums computed before the DISTINCT, or legitimate repeated rows, can be wrong, and DISTINCT adds a costly sort on large tables. Instead, find why duplicates appear, fix the join or aggregate the child table first, and add a uniqueness test on the key.
WITH d AS (
SELECT DISTINCT user_id, CAST(login_time AS DATE) AS dt
FROM logins
),
g AS (
SELECT user_id, dt,
dt - CAST(ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY dt) AS INT) AS grp
FROM d
)
SELECT DISTINCT user_id
FROM g
GROUP BY user_id, grp
HAVING COUNT(*) >= 3;
-- gaps and islands: consecutive dates share the same grp value
32
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])
33
Your findings deck has 30 slides and you have 10 minutes with leadership. How do you cut it down?
Write the single key message first, then keep only slides that directly support it, usually three to five: the headline finding, the main driver, the impact in money, and the recommendation with next steps. Merge related charts, use action titles, and move everything else to an appendix for questions. Rehearse to fit in about seven minutes, leaving time for discussion, because the discussion is where decisions are made.
Row context evaluates one row at a time (calculated columns); filter context is the set of filters from slicers, visuals and relationships that a measure sees.
36
Marketing wants to A/B test two email subject lines on a list of 2,000 subscribers. What do you advise?
With 1,000 per group and a typical click rate of 3%, only a very large difference, roughly 70% relative or more, would be detectable, so a small real lift would look like noise. I would suggest testing on a larger send, pooling several campaigns, or using open-to-click rate with a bigger effect. If they still run it, report the confidence interval and treat the result as directional.
Prepare carefully and stay factual. Share the finding early with the initiative owner privately so they are not surprised in a big meeting. Lead with the question asked, the method and the evidence, acknowledge limitations and what is working, and avoid blaming anyone. Offer options, such as fixing a specific step, narrowing the scope or stopping, with estimated impact. Bad news delivered with solutions is received far better.
39
Your Sales table has OrderDate and ShipDate. How do you analyse sales by ship date when only OrderDate is the active relationship?
-- create an inactive relationship Sales[ShipDate] -> 'Date'[Date] in the model
Sales by Ship Date =
CALCULATE(
[Total Sales],
USERELATIONSHIP(Sales[ShipDate], 'Date'[Date])
)
-- the measure uses the inactive relationship only inside this CALCULATE
-- the alternative is a second role-playing date table
40
Write pandas code to convert daily sales into weekly totals, showing zero for days with no sales.
df['date'] = pd.to_datetime(df['date'])
daily = (df.groupby('date')['sales'].sum()
.asfreq('D', fill_value=0)) # adds missing days as 0
weekly = daily.resample('W-MON', label='left', closed='left').sum()
print(weekly.head())
# W-MON with label/closed left gives weeks starting on Monday
Tips to crack the Lenskart Data Analytics interview
For tech roles, practise DSA and backend basics, and be ready to discuss APIs, databases and scaling e-commerce systems.
For analyst roles, revise SQL, Excel and metrics like conversion rate, average order value and store performance.
Understand Lenskart's omnichannel model of online plus offline stores to answer business and product questions with context.
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; Lenskart interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Lenskart Data Analytics interview?
Candidates usually go through 4 stages: Online coding or analytics assessment; Technical round; Case or managerial round; HR 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 Lenskart Data Analytics interview?
This practice set leans on Python for Analysis (7), Tableau (6), SQL (6), Data Storytelling (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Lenskart interviewers ask you to walk through real work.
Are these the exact questions asked at Lenskart?
No. These are curated practice questions that match the skills and difficulty usually tested in e-commerce & consumer tech interviews like Lenskart's. They are not a leaked or verified list of past questions.
Where does Lenskart hire Data Analytics professionals in India?
Lenskart has large teams in Gurugram, Bengaluru. Openings and locations change often, so check the Lenskart careers page and filter by city and experience.