Skip to content

HSBC Data Analytics Interview Questions & Answers

Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.

Solved for HSBCStart practicing
3 QUESTIONS FREESign up or log in 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 outliers in Pandas?

HSBCMedium
Save to ▾
Show answer
Detect with IQR or z-score, then cap with clip, remove, transform with log, or keep and flag them depending on whether they are errors or real events.
02

How do you remove duplicates in Excel?

HSBCEasy
Save to ▾
Show answer
Data tab, Remove Duplicates, pick the columns to compare. For a non-destructive way use UNIQUE() or conditional formatting to highlight repeats first.
03

What is the difference between a calculated field and a helper column in Excel?

HSBCMedium
Save to ▾
Show answer
A calculated field lives inside a PivotTable and works on summarised data; a helper column is a normal column of formulas that feeds the PivotTable or other formulas.
04

What is the difference between DELETE, TRUNCATE and DROP?

HSBCEasy
Save to ▾
Show answer
DELETE removes chosen rows and can be rolled back; TRUNCATE empties the table quickly; DROP removes the table structure itself.
05

Sales dropped 20% last month. How will you analyse it?

HSBCMedium
Save to ▾
Show answer
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.
06

What is a CTE and when would you use one?

HSBCMedium
Save to ▾
Show answer
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.
07

What is a star schema?

HSBCMedium
Save to ▾
Show answer
A central fact table (sales, numeric events) linked to dimension tables (date, product, customer). It keeps Power BI models simple, fast and correct when filtering.
08

How do you handle errors like #N/A and #DIV/0!?

HSBCMedium
Save to ▾
Show answer
Fix the root cause when possible, or wrap formulas with IFERROR or IFNA to return a clear fallback value.
09

DAX: calculated column vs measure?

HSBCMedium
Save to ▾
Show answer
A calculated column is computed row by row and stored in the model. A measure is computed at query time using the filter context, e.g. Total Sales = SUM(Sales[Amount]). Prefer measures for aggregations.
10

How do you optimise a slow SQL query?

HSBCHard
Save to ▾
Show answer
Read the execution plan, add or fix indexes, select only needed columns, filter early, avoid functions on indexed columns, and replace correlated subqueries with joins.
11

Explain GROUP BY with an example.

HSBCMedium
Save to ▾
Show answer
It groups rows sharing values so aggregates run per group, for example SELECT region, SUM(sales) FROM orders GROUP BY region.
12

VLOOKUP vs INDEX-MATCH vs XLOOKUP?

HSBCEasy
Save to ▾
Show answer
VLOOKUP only looks to the right and breaks when columns are inserted. INDEX-MATCH looks in any direction and is robust. XLOOKUP is the modern option with exact match by default and left lookups.
13

Design a dashboard for CXOs — what principles do you follow?

HSBCHard
Save to ▾
Show answer
Start from the business questions, show 4–6 top KPIs with trend vs target, allow drill-downs, keep colours consistent, remove clutter, add time/region filters and give one clear insight per visual.
14

How do you present insights to non-technical stakeholders?

HSBCMedium
Save to ▾
Show answer
Lead with the answer, use one simple chart per point, translate numbers into business impact (₹, %), avoid jargon and end with a clear recommendation and next step.
15

What is a gateway in Power BI?

HSBCMedium
Save to ▾
Show answer
A bridge that lets the Service refresh data from on-premises sources securely on a schedule.
16

Show a Pandas groupby example.

HSBCEasy
Save to ▾
Show answer
df.groupby('region')['sales'].agg(['sum', 'mean', 'count']) # splits by region, aggregates, combines the results
17

What are indexes and when can they hurt?

HSBCMedium
Save to ▾
Show answer
Indexes speed up lookups by keeping sorted pointers. They slow writes and use space, so index columns used in filters and joins, not every column.
18

How would you segment customers?

HSBCHard
Save to ▾
Show answer
Use RFM scoring or clustering on behaviour and value, validate segments with business teams and attach an action to each segment.
19

What is Row-Level Security?

HSBCMedium
Save to ▾
Show answer
Rules that restrict data per user role, for example sales managers seeing only their region, defined with DAX filters and assigned in the Service.
20

Difference between a CTE, a subquery and a temp table?

HSBCMedium
Save to ▾
Show answer
A subquery is inline; a CTE is a named, readable block for one statement; a temp table is physically stored for the session and can be indexed and reused.
21

Explain INDEX and MATCH together.

HSBCMedium
Save to ▾
Show answer
MATCH finds the position of a value in a range and INDEX returns the item at that position, giving a flexible lookup that works left or right and survives column insertions.
22

How are NULLs handled in SQL?

HSBCMedium
Save to ▾
Show answer
NULL means unknown, so comparisons with = fail; use IS NULL, COALESCE for defaults and remember most aggregates ignore NULLs except COUNT(*).
23

What is Power BI and its main components?

HSBCEasy
Save to ▾
Show answer
A Microsoft BI tool made of Power BI Desktop for building reports, the Service for sharing, and Mobile; it connects, models and visualises data.
24

Write SQL for a running total of sales by date.

HSBCMedium
Save to ▾
Show answer
SELECT order_date, SUM(amount) OVER (ORDER BY order_date) AS running_total FROM sales;
25

How do you read a CSV and inspect it in Pandas?

HSBCEasy
Save to ▾
Show answer
df = pd.read_csv('file.csv'); then head(), info(), describe() and isna().sum() for a quick health check.
26

What is the difference between mean and median for reporting salaries?

HSBCMedium
Save to ▾
Show answer
Salaries are right-skewed, so the median better represents the typical employee while the mean is pulled up by a few high earners.
27

What is normalisation?

HSBCMedium
Save to ▾
Show answer
Organising tables to reduce redundancy and anomalies by splitting data into related tables, commonly up to third normal form.
28

How do you define and choose KPIs?

HSBCMedium
Save to ▾
Show answer
Pick metrics tied to a business goal that are measurable, actionable and owned by someone, and pair a lagging metric with a leading one.
29

How do you change data types and parse dates?

HSBCMedium
Save to ▾
Show answer
df['date'] = pd.to_datetime(df['date']); df['amount'] = pd.to_numeric(df['amount'], errors='coerce'); astype('category') for repeated strings.
30

How would you investigate a sudden 20% drop in daily sales?

HSBCMedium
Save to ▾
Show answer
Check data pipelines first, then segment by channel, region, product and device, compare to the same period last year, and look for launches, outages or campaigns.
31

RANK vs DENSE_RANK vs ROW_NUMBER?

HSBCMedium
Save to ▾
Show answer
ROW_NUMBER gives a unique sequence. RANK gives ties the same rank and skips the next (1, 1, 3). DENSE_RANK gives ties the same rank without gaps (1, 1, 2).
32

What does the IF function do and how do you nest it?

HSBCEasy
Save to ▾
Show answer
IF returns one result if a test is true and another if false. Nest IFs for multiple outcomes, or use IFS for cleaner formulas.
33

How do you merge two DataFrames on different column names?

HSBCMedium
Save to ▾
Show answer
pd.merge(df1, df2, left_on='cust_id', right_on='id', how='left') joins on differently named keys.
34

Which Python libraries do analysts use most?

HSBCEasy
Save to ▾
Show answer
Pandas for data handling, NumPy for numerics, Matplotlib and Seaborn for charts, and openpyxl or SQLAlchemy for files and databases.
35

What is the difference between melt and pivot?

HSBCMedium
Save to ▾
Show answer
melt converts wide data to long format; pivot converts long data to wide, and they are used to reshape data for analysis or charts.
36

Find customers who ordered in January but not in February.

HSBCHard
Save to ▾
Show answer
SELECT DISTINCT customer_id FROM orders WHERE month = 'Jan' EXCEPT SELECT customer_id FROM orders WHERE month = 'Feb';
37

How do you deal with missing or duplicate data?

HSBCEasy
Save to ▾
Show answer
Profile the data, remove exact duplicates using keys, impute missing values (mean/median/mode or a business rule), flag imputed rows and document every cleaning step.
38

A marketing campaign shows more sales. How do you prove it worked?

HSBCHard
Save to ▾
Show answer
Compare with a control group or use difference-in-differences, control for seasonality, and measure incremental sales against campaign cost.
39

How do you handle large CSV files that do not fit in memory in Python?

HSBCMedium
Save to ▾
Show answer
Read in chunks with chunksize, load only needed columns, set efficient dtypes or switch to Dask, Polars or a database.
40

How do you detect outliers?

HSBCMedium
Save to ▾
Show 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.
41

How do you find duplicate rows in a table?

HSBCMedium
Save to ▾
Show answer
SELECT col, COUNT(*) FROM t GROUP BY col HAVING COUNT(*) > 1; use ROW_NUMBER() partitioned by the key to delete extras.
42

What is the difference between COUNT, COUNTA and COUNTIF?

HSBCEasy
Save to ▾
Show answer
COUNT counts numbers, COUNTA counts non-empty cells and COUNTIF counts cells meeting one condition; COUNTIFS handles several conditions.
43

How would you automate a weekly report with Python?

HSBCHard
Save to ▾
Show answer
Pull data with SQL or APIs, clean and aggregate with Pandas, build charts and an Excel or PDF output, and schedule it with cron or Airflow with logging and alerts.
44

Find the second highest salary in SQL.

HSBCEasy
Save to ▾
Show answer
SELECT MAX(salary) FROM emp WHERE salary < (SELECT MAX(salary) FROM emp); -- or: DENSE_RANK() OVER (ORDER BY salary DESC) = 2
45

What is vectorisation and why does it matter?

HSBCMedium
Save to ▾
Show answer
Applying operations to whole arrays at once instead of Python loops, which is far faster because it runs in optimised compiled code.
46

Explain the types of SQL joins.

HSBCEasy
Save to ▾
Show answer
INNER returns matching rows, LEFT keeps all left rows, RIGHT keeps all right rows, FULL keeps all rows from both, and CROSS returns every combination.
47

What are slicers and filters?

HSBCEasy
Save to ▾
Show answer
Slicers are on-page visual filters users click; filters can be set at visual, page or report level and may be hidden from users.
48

What is the difference between a view and a materialised view?

HSBCMedium
Save to ▾
Show answer
A view stores a query and runs it each time; a materialised view stores the result physically and must be refreshed, making reads faster.
49

How do you create a new column from conditions?

HSBCMedium
Save to ▾
Show answer
Use np.where for one condition, np.select for several, or df.apply with a function for custom logic.
50

Which KPIs would you track for an e-commerce app?

HSBCMedium
Save to ▾
Show answer
DAU/MAU, conversion rate, average order value, cart abandonment, retention/churn, CAC, LTV, return rate and NPS.
51

What is the difference between a clustered and a non-clustered index?

HSBCMedium
Save to ▾
Show answer
A clustered index defines the physical order of rows (one per table); a non-clustered index is a separate structure with pointers to the rows.
52

How do you decide the sample size for a survey?

HSBCMedium
Save to ▾
Show answer
It depends on margin of error, confidence level and expected variability; larger samples give smaller errors with diminishing returns.
53

How do you improve Power BI report performance?

HSBCMedium
Save to ▾
Show answer
Use a star schema, remove unused columns, prefer measures, reduce visuals per page, limit high-cardinality fields and use aggregations or incremental refresh.
54

How do you clean messy text data in Excel?

HSBCMedium
Save to ▾
Show answer
Use TRIM, CLEAN, UPPER or PROPER, Text to Columns, Flash Fill, SUBSTITUTE, and Power Query for repeatable cleaning steps.