TGViewer
Data Analytics Data Analytics @sqlspecialist ยท 111K subscribers
Post #2706 5.85K
๐Ÿ’ผ Top 20 Frequently Asked Data Analyst Interview Questions

๐Ÿง  1) Can you walk me through the tools you use for data analysis?
๐Ÿ‘‰ Answer: Absolutely! For data extraction I use SQL to query databases like MySQL and PostgreSQL. For cleaning and analysis, Python with pandas and NumPy is my go-to. Excel for quick pivots and Power BI/Tableau for interactive dashboards. I pick the right tool based on data size and stakeholder needs.

๐ŸŽฏ 2) Write a SQL query to find the 2nd highest salary from employees table.
๐Ÿ‘‰ Answer:
SELECT MAX(salary) as second_highest
FROM employees
WHERE salary < (SELECT MAX(salary) FROM employees);
Follow-up: Or using window functions: DENSE_RANK() OVER (ORDER BY salary DESC)

๐Ÿ“Š 3) Explain INNER JOIN vs LEFT JOIN with a business example.
๐Ÿ‘‰ Answer: INNER JOIN gives only matching records. LEFT JOIN gives all from left table + matches from right.
Example: Customer orders analysis - LEFT JOIN keeps customers with zero orders to see churn patterns.

๐Ÿ” 4) How would you handle missing values in a sales dataset?
๐Ÿ‘‰ Answer: Step 1: df.isnull().sum() to assess impact. Step 2: For numbers - impute median (df.fillna(df.median())). For categories - mode. Step 3: Flag imputed values for transparency. Never drop >5% without business justification.

๐Ÿงฉ 5) What's pandas groupby() and write an example?
๐Ÿ‘‰ Answer:
# Sales by region + month
df.groupby(['region', 'month'])['revenue'].agg({
'mean': 'mean',
'total': 'sum',
'records': 'count'
}).round(2)
Split -> Apply -> Combine pattern!

๐Ÿ“ˆ 6) When would you normalize vs denormalize a database?
๐Ÿ‘‰ Answer: Normalize for transactional systems (OLTP) to save storage. Denormalize for analytics (OLAP) for faster queries. Example: Star schema with fact/dimension tables.

๐Ÿ”ข 7) VLOOKUP vs INDEX+MATCH - which is better and why?
๐Ÿ‘‰ Answer: INDEX+MATCH wins! VLOOKUP breaks if columns shift and only looks right.
=INDEX(sales_range, MATCH(A2, id_range, 0))
Dynamic, safer, 2-way lookup.

๐Ÿ“‰ 8) Difference between COUNT() vs COUNT(column_name)?
๐Ÿ‘‰ Answer: COUNT(
): Total rows including NULLs. COUNT(column): Non-null values only. Use COUNT() for total records, COUNT(sales) to exclude null sales.

โš™๏ธ 9) How do you identify and remove duplicates in pandas?
๐Ÿ‘‰ Answer:
# Find duplicates
dupe_count = df.duplicated(subset=['email']).sum()
print(f"Found {dupe_count} duplicates")

# Remove (keep first)
df_clean = df.drop_duplicates(subset=['email'], keep='first')
Always check business logic first!

๐Ÿง  10) Name 4 SQL aggregate functions with a practical example.
๐Ÿ‘‰ Answer:
SELECT
dept,
COUNT(
) as headcount,
AVG(salary) as avg_salary,
MAX(salary) as top_earner,
SUM(salary) as payroll
FROM employees
GROUP BY dept;
๐Ÿ“Š 11) Sales dropped 20% last quarter. Walk me through your analysis.
๐Ÿ‘‰ Answer: Framework:
1๏ธโƒฃ Segment - Product/Category/Region/Customer
2๏ธโƒฃ Trends - YoY, MoM, seasonality
3๏ธโƒฃ Funnel - Where drop occurs
4๏ธโƒฃ External - Competitor pricing, marketing
Dashboard: Drill-down + alerts for anomalies.

๐ŸŽฏ 12) What's the difference between Data Analyst and Data Scientist?
๐Ÿ‘‰ Answer: DA: SQL/Excel/Dashboards = 'What happened?' DS: ML/Python/R = 'What will happen?'
Analogy: DA = Rearview mirror, DS = Crystal ball. Most value from clean DA first!

๐Ÿ” 13) Write a SQL window function to rank salaries by department.
๐Ÿ‘‰ Answer:
SELECT name, dept, salary,
RANK() OVER (PARTITION BY dept ORDER BY salary DESC) as dept_rank
FROM employees;
๐Ÿงฉ 14) How do you create a pivot table showing sales by region/month?
๐Ÿ‘‰ Answer: Excel: Insert -> PivotTable -> Rows: Region -> Columns: Month -> Values: Sum of Sales -> Slicers for filters. Power BI: Drag-drop + matrix visual.

๐Ÿ“ˆ 15) Explain correlation vs causation with an example.
๐Ÿ‘‰ Answer: Classic: Ice cream sales correlate with drownings (both peak summer)

Correlation โ‰  Causation. Need experiments to prove cause-effect.
  • โค 11
  • ๐Ÿ‘ 1
More from @sqlspecialist
  1. Oct 9, 2026โ€œHere, the data is sorted by the second column in descending order and the first five rowsโ€ฆ
  2. Oct 9, 2026๐Ÿ“Š Data Analyst Interview Series โ€” Part 6 Guys, let's continue our Data Analyst Interviewโ€ฆ
  3. Oct 9, 2026๐Ÿ‡ฎ๐Ÿ‡ณ ๐—š๐—ข๐—ฉ๐—˜๐—ฅ๐—ก๐— ๐—˜๐—ก๐—ง ๐—ข๐—™ ๐—œ๐—ก๐——๐—œ๐—” โ€” ๐—”๐—œ๐—–๐—ง๐—˜ ๐—œ๐—ก๐—ง๐—˜๐—ฅ๐—ก๐—ฆ๐—›๐—œ๐—ฃ๐—ฆ ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ ๐Ÿš€โ€ฆ
  4. Oct 8, 2026๐ŸŽ“ ๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ผ๐—ณ๐˜ ๐—™๐—ฅ๐—˜๐—˜ ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ ๐˜„๐—ถ๐˜๐—ต ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ฒ๐˜€! ๐Ÿš€๐Ÿ”ฅ Upgrโ€ฆ
  5. Oct 7, 2026๐Ÿ“Š Kandinsky 6.0 Video: AI-Powered Content Creation for Analysts The new Kandinsky 6.0 Vidโ€ฆ
  6. Oct 7, 2026Alternatively, depending on the Excel version and requirement, I could use functions suchโ€ฆ
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook โ†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 โ†’