β¨πHOW TO FUTURE-PROOF YOUR IT CAREER IN THE AI ERAπΊ
π Date: 11 April 2026
β° 7 β 9 PM (IST)
π» FREE Online Masterclass
πPerks of Attending:
β Exclusive 90-Day Placement Plan
β Tech & Non-Tech Career Paths Explained
β Insider Interview Preparation Tips
β Certificate of Participation
β Skill-Building Ebooks
β Surprise Bonus Gift
β‘ Limited Slots Available!
π Register Now for FREE & secure your seat!
https://link.guvi.in/programming_experts03100
π Date: 11 April 2026
β° 7 β 9 PM (IST)
π» FREE Online Masterclass
πPerks of Attending:
β Exclusive 90-Day Placement Plan
β Tech & Non-Tech Career Paths Explained
β Insider Interview Preparation Tips
β Certificate of Participation
β Skill-Building Ebooks
β Surprise Bonus Gift
β‘ Limited Slots Available!
π Register Now for FREE & secure your seat!
https://link.guvi.in/programming_experts03100
β€12
ππ»ππ²πΏππΆπ²ππ²πΏ: You have 2 minutes to solve this SQL query.
Find the second highest salary in each department from the employees table, excluding any department with fewer than 2 employees.
π π²: Challenge accepted!
I used a subquery with ROW_NUMBER() window function partitioned by department to rank salaries in descending order within each department. The outer query then filters for rank 2 (second highest) and groups to get distinct departments. This demonstrates mastery of window functions, which are essential for advanced analytics and ranking problems.
π§πΆπ½ π³πΌπΏ π¦π€π ππΌπ― π¦π²π²πΈπ²πΏπ:
Window functions like ROW_NUMBER(), RANK(), and DENSE_RANK() unlock complex ranking and analyticsβpractice them daily to ace behavioral and technical rounds!
React with β€οΈ for more
Find the second highest salary in each department from the employees table, excluding any department with fewer than 2 employees.
π π²: Challenge accepted!
SELECT
department,
MAX(salary) AS second_highest_salary
FROM (
SELECT
department,
salary,
ROW_NUMBER() OVER (PARTITION BY department ORDER BY salary DESC) as rn
FROM employees
) ranked
WHERE rn = 2
GROUP BY department;
I used a subquery with ROW_NUMBER() window function partitioned by department to rank salaries in descending order within each department. The outer query then filters for rank 2 (second highest) and groups to get distinct departments. This demonstrates mastery of window functions, which are essential for advanced analytics and ranking problems.
π§πΆπ½ π³πΌπΏ π¦π€π ππΌπ― π¦π²π²πΈπ²πΏπ:
Window functions like ROW_NUMBER(), RANK(), and DENSE_RANK() unlock complex ranking and analyticsβpractice them daily to ace behavioral and technical rounds!
React with β€οΈ for more
β€23π1π1
β
Power BI Interview Questions with Answers
1. What is DAX?
DAX (Data Analysis Expressions) is a formula language in Power BI used to create calculated columns, measures, and tables (e.g., SUM(), CALCULATE(), FILTER()) for business logic and KPIs.
2. What is the difference between Power Query and Power Pivot?
β’ Power Query: used for data loading, cleaning, and transforming (ETL) before loading into the model.
β’ Power Pivot: inβmemory data model and engine for DAX calculations and relationships (used during/after load).
3. What is the difference between measure vs calculated column?
β’ Measure: calculated at query time, used in visuals (e.g., summaries, ratios).
β’ Calculated column: computed at refresh time, stored in the model (uses more memory). Prefer measures for aggregations.
4. Explain CALCULATE() function.
CALCULATE() changes the context of a calculation by applying filters.
Example: Total Sales = CALCULATE(SUM(Sales[Amount]), Sales[Region] = "West") computes sum only for West region.
5. What are relationships (1:M, M:M)?
β’ 1:M (oneβtoβmany): one row in the β1β table links to many rows in the βMβ table (most common).
β’ M:M (manyβtoβmany): handled via an intermediate bridge table with foreign keys on both sides.
6. How do you handle manyβtoβmany?
Create a bridge table (junction table) that contains foreign keys to both related tables. Then set 1:M relationships from each original table to the bridge.
7. What is rowβlevel security (RLS)?
RLS restricts which rows a user can see in a report (e.g., by SalesRegion = βUserRegionβ). Defined in the model with DAX filter expressions and applied by user roles.
8. How do you setup incremental refresh?
β’ Mark your tables as βincrementally refreshableβ in the model.
β’ Define a date/time column and ranges (e.g., last 3 years full, last 60 days incremental).
β’ Set refresh schedule in the Power BI service with gateways if needed.
9. What is the difference between filters vs slicers?
β’ Filters: rules applied behind the scenes (e.g., in page/report level filters) that always apply.
β’ Slicers: interactive controls on the report canvas that users click to change what data is shown.
10. What is a data model?
A data model is the structure in Power BI that holds tables, relationships, calculated columns, measures, and hierarchies, forming the semantic layer for reporting.
11. How do you publish and share reports?
β’ Publish from Power BI Desktop to a workspace in Power BI Service.
β’ Share via apps, workspaces, or by granting access to specific users/groups; use RLS and sharing permissions to control who sees what.
12. What is Performance Analyzer tool?
Performance Analyzer in Power BI Desktop records how long each visual takes to render and which DAX queries run, helping identify slow visuals or large queries.
13. How do you create monthβonβmonth growth DAX?
MoM Growth =
VAR CurrentSales = [Total Sales]
VAR PreviousSales = CALCULATE([Total Sales], DATEADD('Date'[Date], -1, MONTH))
RETURN
DIVIDE(CurrentSales - PreviousSales, PreviousSales)
14. How do you use custom visuals?
Download a custom visual from the marketplace, add it to the report in Power BI Desktop or Service, then configure like a native visual (fields, formatting, interactivity).
15. What is gateway for refresh?
An onβpremises gateway connects Power BI Service to data sources behind your firewall (e.g., SQL Server, file shares). It enables scheduled refresh for datasets that pull from those sources.
16. What is a .pbix file?
A .pbix file is the Power BI Desktop project file that contains the report layout, queries, data model, and DAX logic. It can be opened in Power BI Desktop or published to the service.
17. What are quick measures examples?
Quick measures are autoβgenerated DAX calculations with a UI. Examples:
β’ Average of a column.
1. What is DAX?
DAX (Data Analysis Expressions) is a formula language in Power BI used to create calculated columns, measures, and tables (e.g., SUM(), CALCULATE(), FILTER()) for business logic and KPIs.
2. What is the difference between Power Query and Power Pivot?
β’ Power Query: used for data loading, cleaning, and transforming (ETL) before loading into the model.
β’ Power Pivot: inβmemory data model and engine for DAX calculations and relationships (used during/after load).
3. What is the difference between measure vs calculated column?
β’ Measure: calculated at query time, used in visuals (e.g., summaries, ratios).
β’ Calculated column: computed at refresh time, stored in the model (uses more memory). Prefer measures for aggregations.
4. Explain CALCULATE() function.
CALCULATE() changes the context of a calculation by applying filters.
Example: Total Sales = CALCULATE(SUM(Sales[Amount]), Sales[Region] = "West") computes sum only for West region.
5. What are relationships (1:M, M:M)?
β’ 1:M (oneβtoβmany): one row in the β1β table links to many rows in the βMβ table (most common).
β’ M:M (manyβtoβmany): handled via an intermediate bridge table with foreign keys on both sides.
6. How do you handle manyβtoβmany?
Create a bridge table (junction table) that contains foreign keys to both related tables. Then set 1:M relationships from each original table to the bridge.
7. What is rowβlevel security (RLS)?
RLS restricts which rows a user can see in a report (e.g., by SalesRegion = βUserRegionβ). Defined in the model with DAX filter expressions and applied by user roles.
8. How do you setup incremental refresh?
β’ Mark your tables as βincrementally refreshableβ in the model.
β’ Define a date/time column and ranges (e.g., last 3 years full, last 60 days incremental).
β’ Set refresh schedule in the Power BI service with gateways if needed.
9. What is the difference between filters vs slicers?
β’ Filters: rules applied behind the scenes (e.g., in page/report level filters) that always apply.
β’ Slicers: interactive controls on the report canvas that users click to change what data is shown.
10. What is a data model?
A data model is the structure in Power BI that holds tables, relationships, calculated columns, measures, and hierarchies, forming the semantic layer for reporting.
11. How do you publish and share reports?
β’ Publish from Power BI Desktop to a workspace in Power BI Service.
β’ Share via apps, workspaces, or by granting access to specific users/groups; use RLS and sharing permissions to control who sees what.
12. What is Performance Analyzer tool?
Performance Analyzer in Power BI Desktop records how long each visual takes to render and which DAX queries run, helping identify slow visuals or large queries.
13. How do you create monthβonβmonth growth DAX?
MoM Growth =
VAR CurrentSales = [Total Sales]
VAR PreviousSales = CALCULATE([Total Sales], DATEADD('Date'[Date], -1, MONTH))
RETURN
DIVIDE(CurrentSales - PreviousSales, PreviousSales)
14. How do you use custom visuals?
Download a custom visual from the marketplace, add it to the report in Power BI Desktop or Service, then configure like a native visual (fields, formatting, interactivity).
15. What is gateway for refresh?
An onβpremises gateway connects Power BI Service to data sources behind your firewall (e.g., SQL Server, file shares). It enables scheduled refresh for datasets that pull from those sources.
16. What is a .pbix file?
A .pbix file is the Power BI Desktop project file that contains the report layout, queries, data model, and DAX logic. It can be opened in Power BI Desktop or published to the service.
17. What are quick measures examples?
Quick measures are autoβgenerated DAX calculations with a UI. Examples:
β’ Average of a column.
β€17
18. What is data blending in Power BI?
Data blending (sometimes confused with βmergeβ) usually refers to combining fields from multiple tables at the visualization level, often via relationships or calculated columns/measures rather than ETL-level joins.
19. How do you optimize large datasets?
β’ Use a star-schema model, avoid unnested structures.
β’ Use appropriate data types, remove unnecessary columns.
β’ Prefer measures over large calculated columns, enable incremental refresh, and push heavy filters to the source when possible.
20. What is Get Data?
βGet Dataβ (in Power BI Desktop) is the Power Query interface that lets you connect to various sources (SQL, Excel, Web, etc.), load, and transform data into the model.
Double Tap β€οΈ For More
Data blending (sometimes confused with βmergeβ) usually refers to combining fields from multiple tables at the visualization level, often via relationships or calculated columns/measures rather than ETL-level joins.
19. How do you optimize large datasets?
β’ Use a star-schema model, avoid unnested structures.
β’ Use appropriate data types, remove unnecessary columns.
β’ Prefer measures over large calculated columns, enable incremental refresh, and push heavy filters to the source when possible.
20. What is Get Data?
βGet Dataβ (in Power BI Desktop) is the Power Query interface that lets you connect to various sources (SQL, Excel, Web, etc.), load, and transform data into the model.
Double Tap β€οΈ For More
β€11
πΌ Data Analyst Interview Questions β Part 1 (HR Round)
π§ 1) Tell me about yourself.
π Answer:
"I'm a Data Analyst proficient in SQL, Python, Power BI, and Excel. I've built dashboards and delivered business insights from complex datasets. Passionate about turning data into decisions and excited to contribute here!"
π― 2) Why should we hire you for this Data Analyst role?
π Answer:
"I deliver actionable insights using SQL, Python, and visualization toolsβnot just theory. I'm quick to learn new tools and focused on solving real business problems with data."
π 3) What are your weaknesses as a data analyst?
π Answer:
"Sometimes I focus too much on perfecting data cleaning, but I'm learning to prioritize impact and use automation to meet deadlines effectively."
β οΈ Never say "I have no weaknesses"
π 4) What are your key strengths?
π Answer:
"Strong analytical thinking, quick mastery of tools like Power BI/SQL, and ability to simplify complex data into clear business stories."
π§© 5) Describe a challenging situation you faced in a project.
π Answer:
"Handled messy sales data causing forecast errors. Used Python (pandas) + SQL for cleaning, built Power BI dashboardβimproved accuracy 30% and strengthened my ETL skills."
π€ 6) How do you work in a team environment?
π Answer:
"I communicate insights clearly through dashboards/reports, take ownership of analysis tasks, collaborate via Git/shared drives, and help teammates with SQL queries."
β³ 7) How do you manage tight deadlines on analysis projects?
π Answer:
"I prioritize by business impact, break into steps (ETL β analysis β viz), and track progress with Jira/Trello for consistent delivery."
π 8) Are you open to learning new data tools and technologies?
π Answer:
"Absolutely! I continuously upskill in areas like advanced Python ML libraries, Tableau, or cloud analytics to stay impactful."
π¬ 9) Do you have any questions for us?
π Answer:
"Yes:
β’ What does a typical day look like for a Data Analyst here?
β’ What tools does your team primarily use (Power BI, Tableau, etc.)?"
π§ 10) Where do you see yourself in 2-3 years?
π Answer:
"As a Senior Data Analyst leading projects, building predictive models, and driving strategic business decisions with data."
Double Tap β€οΈ For More!
π§ 1) Tell me about yourself.
π Answer:
"I'm a Data Analyst proficient in SQL, Python, Power BI, and Excel. I've built dashboards and delivered business insights from complex datasets. Passionate about turning data into decisions and excited to contribute here!"
π― 2) Why should we hire you for this Data Analyst role?
π Answer:
"I deliver actionable insights using SQL, Python, and visualization toolsβnot just theory. I'm quick to learn new tools and focused on solving real business problems with data."
π 3) What are your weaknesses as a data analyst?
π Answer:
"Sometimes I focus too much on perfecting data cleaning, but I'm learning to prioritize impact and use automation to meet deadlines effectively."
β οΈ Never say "I have no weaknesses"
π 4) What are your key strengths?
π Answer:
"Strong analytical thinking, quick mastery of tools like Power BI/SQL, and ability to simplify complex data into clear business stories."
π§© 5) Describe a challenging situation you faced in a project.
π Answer:
"Handled messy sales data causing forecast errors. Used Python (pandas) + SQL for cleaning, built Power BI dashboardβimproved accuracy 30% and strengthened my ETL skills."
π€ 6) How do you work in a team environment?
π Answer:
"I communicate insights clearly through dashboards/reports, take ownership of analysis tasks, collaborate via Git/shared drives, and help teammates with SQL queries."
β³ 7) How do you manage tight deadlines on analysis projects?
π Answer:
"I prioritize by business impact, break into steps (ETL β analysis β viz), and track progress with Jira/Trello for consistent delivery."
π 8) Are you open to learning new data tools and technologies?
π Answer:
"Absolutely! I continuously upskill in areas like advanced Python ML libraries, Tableau, or cloud analytics to stay impactful."
π¬ 9) Do you have any questions for us?
π Answer:
"Yes:
β’ What does a typical day look like for a Data Analyst here?
β’ What tools does your team primarily use (Power BI, Tableau, etc.)?"
π§ 10) Where do you see yourself in 2-3 years?
π Answer:
"As a Senior Data Analyst leading projects, building predictive models, and driving strategic business decisions with data."
Double Tap β€οΈ For More!
β€29π1π1
ππ»ππ²πΏππΆπ²ππ²πΏ: You have 2 minutes to solve this SQL query.
From the employees table, retrieve the employee name, department, and their salary rank within the department (highest salary rank 1).
π π²: Challenge accepted!
I applied
π§πΆπ½ π³πΌπΏ π¦π€π ππΌπ― π¦π²π²πΈπ²πΏπ:
Master window function differences (ROW_NUMBER vs RANK vs DENSE_RANK)βthey're interview staples for deduping, paging, and top-N queries!
React with β€οΈ for more
From the employees table, retrieve the employee name, department, and their salary rank within the department (highest salary rank 1).
π π²: Challenge accepted!
SELECT
name,
department,
salary,
DENSE_RANK() OVER (PARTITION BY department ORDER BY salary DESC) AS salary_rank
FROM employees;
I applied
DENSE_RANK() window function partitioned by department and ordered by descending salary to assign ranks within each department. Unlike ROW_NUMBER(), DENSE_RANK() handles ties by assigning the same rank without gaps. This is ideal for leaderboards or performance analytics.π§πΆπ½ π³πΌπΏ π¦π€π ππΌπ― π¦π²π²πΈπ²πΏπ:
Master window function differences (ROW_NUMBER vs RANK vs DENSE_RANK)βthey're interview staples for deduping, paging, and top-N queries!
React with β€οΈ for more
β€11π7
β
Complete Roadmap to Learn SQL (Structured Query Language) π§ π»
Week 1: SQL Basics
- What is SQL and how databases work
- Install MySQL Workbench or PostgreSQL
- Learn SELECT, FROM, WHERE
- Filtering data with conditions
- Practice basic queries
Example: Fetch all employees, filter salary > 50k
Week 2: Sorting and Aggregation
- ORDER BY (sorting data)
- Aggregate functions: COUNT, SUM, AVG, MIN, MAX
- GROUP BY concept
- HAVING clause
Example: Department-wise average salary
Week 3: Joins (Most Important π₯)
- INNER JOIN
- LEFT JOIN, RIGHT JOIN
- FULL JOIN
- Self Join
Example: Combine employees and departments tables
Week 4: Advanced Filtering
- IN, BETWEEN, LIKE
- Wildcards (% , _)
- NULL handling (IS NULL, IS NOT NULL)
- CASE statements
Example: Categorize customers based on spending
Week 5: Subqueries
- Nested queries
- Correlated subqueries
- Using subqueries in SELECT, WHERE
Example: Find employees earning above average salary
Week 6: Window Functions (High Value π°)
- OVER() clause
- ROW_NUMBER(), RANK(), DENSE_RANK()
- PARTITION BY
Example: Rank employees by salary within each department
Week 7: CTE & Views
- Common Table Expressions (WITH)
- Temporary vs permanent views
- Simplify complex queries
Example: Multi-step data transformation
Week 8: Data Modification
- INSERT, UPDATE, DELETE
- TRUNCATE vs DELETE
- Constraints (PRIMARY KEY, FOREIGN KEY)
Example: Update employee salary
Week 9: Indexing & Performance
- What are indexes
- Query optimization basics
- EXPLAIN keyword
Example: Speed up large table queries
Week 10: Working with Real Data
- Import CSV data
- Data cleaning in SQL
- Handling duplicates
- Basic transformations
Example: Clean messy sales dataset
Week 11: Mini Projects
- Write complex queries
- Solve real-world case studies
- Focus on business logic
Examples: Sales dashboard queries, Customer segmentation
Week 12: Final Preparation
- Revise all concepts
- Practice interview questions
- Solve SQL challenges on LeetCode / HackerRank
- Mock interviews
Daily Rule for You
- Practice SQL 60 minutes daily
- Solve 5 queries daily
- Revise previous queries weekly
π₯ Pro Tip
- Focus more on JOINS + WINDOW FUNCTIONS
- Practice real datasets, not just theory
- Think in terms of βbusiness questionsβ
Double Tap β€οΈ For Detailed Explanation
Week 1: SQL Basics
- What is SQL and how databases work
- Install MySQL Workbench or PostgreSQL
- Learn SELECT, FROM, WHERE
- Filtering data with conditions
- Practice basic queries
Example: Fetch all employees, filter salary > 50k
Week 2: Sorting and Aggregation
- ORDER BY (sorting data)
- Aggregate functions: COUNT, SUM, AVG, MIN, MAX
- GROUP BY concept
- HAVING clause
Example: Department-wise average salary
Week 3: Joins (Most Important π₯)
- INNER JOIN
- LEFT JOIN, RIGHT JOIN
- FULL JOIN
- Self Join
Example: Combine employees and departments tables
Week 4: Advanced Filtering
- IN, BETWEEN, LIKE
- Wildcards (% , _)
- NULL handling (IS NULL, IS NOT NULL)
- CASE statements
Example: Categorize customers based on spending
Week 5: Subqueries
- Nested queries
- Correlated subqueries
- Using subqueries in SELECT, WHERE
Example: Find employees earning above average salary
Week 6: Window Functions (High Value π°)
- OVER() clause
- ROW_NUMBER(), RANK(), DENSE_RANK()
- PARTITION BY
Example: Rank employees by salary within each department
Week 7: CTE & Views
- Common Table Expressions (WITH)
- Temporary vs permanent views
- Simplify complex queries
Example: Multi-step data transformation
Week 8: Data Modification
- INSERT, UPDATE, DELETE
- TRUNCATE vs DELETE
- Constraints (PRIMARY KEY, FOREIGN KEY)
Example: Update employee salary
Week 9: Indexing & Performance
- What are indexes
- Query optimization basics
- EXPLAIN keyword
Example: Speed up large table queries
Week 10: Working with Real Data
- Import CSV data
- Data cleaning in SQL
- Handling duplicates
- Basic transformations
Example: Clean messy sales dataset
Week 11: Mini Projects
- Write complex queries
- Solve real-world case studies
- Focus on business logic
Examples: Sales dashboard queries, Customer segmentation
Week 12: Final Preparation
- Revise all concepts
- Practice interview questions
- Solve SQL challenges on LeetCode / HackerRank
- Mock interviews
Daily Rule for You
- Practice SQL 60 minutes daily
- Solve 5 queries daily
- Revise previous queries weekly
π₯ Pro Tip
- Focus more on JOINS + WINDOW FUNCTIONS
- Practice real datasets, not just theory
- Think in terms of βbusiness questionsβ
Double Tap β€οΈ For Detailed Explanation
β€57
πΌ 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.
π§ 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.
β€10π1
π’ 16) How do you merge customer and orders dataframes on customer_id?
π Answer:
# Keep all customers (even no orders)
merged = pd.merge(customers, orders, on='customer_id', how='left')
LEFT JOIN = Industry standard for customer analytics!
π 17) What are 5 must-have KPIs for an e-commerce dashboard?
π Answer:
1. Revenue (vs target)
2. AOV
3. Conversion Rate
4. Cart Abandonment
5. Customer Acquisition Cost. Trend + Target + YoY always!
βοΈ 18) Your SQL query is running slow. How do you optimize?
π Answer:
Top 5 fixes:
1. Indexes on WHERE/JOIN columns
2. EXPLAIN query plan
3. Avoid SELECT *
4. Limit subqueries
5. Aggregate at source.
π§ 19) Tell me about a time your data analysis failed. What happened?
π Answer: Situation: Dashboard showed wrong trends. Problem: Timezone mismatch in sales data. Fix: Added CONVERT_TZ() in SQL + data validation layer. Result: 100% accuracy, saved stakeholder trust.
π¬ 20) Do you have any questions for us?
π Answer: 1. What are the top 3 metrics leadership cares about? 2. What's your biggest data challenge? 3. How do you measure success in this role after 90 days?
Double Tap β€οΈ For More!
π Answer:
# Keep all customers (even no orders)
merged = pd.merge(customers, orders, on='customer_id', how='left')
LEFT JOIN = Industry standard for customer analytics!
π 17) What are 5 must-have KPIs for an e-commerce dashboard?
π Answer:
1. Revenue (vs target)
2. AOV
3. Conversion Rate
4. Cart Abandonment
5. Customer Acquisition Cost. Trend + Target + YoY always!
βοΈ 18) Your SQL query is running slow. How do you optimize?
π Answer:
Top 5 fixes:
1. Indexes on WHERE/JOIN columns
2. EXPLAIN query plan
3. Avoid SELECT *
4. Limit subqueries
5. Aggregate at source.
π§ 19) Tell me about a time your data analysis failed. What happened?
π Answer: Situation: Dashboard showed wrong trends. Problem: Timezone mismatch in sales data. Fix: Added CONVERT_TZ() in SQL + data validation layer. Result: 100% accuracy, saved stakeholder trust.
π¬ 20) Do you have any questions for us?
π Answer: 1. What are the top 3 metrics leadership cares about? 2. What's your biggest data challenge? 3. How do you measure success in this role after 90 days?
Double Tap β€οΈ For More!
β€7π2
π₯ Thanks for the amazing response on SQL Roadmap
Letβs start with the first topic of the SQL Roadmap:
β What is SQL & How Databases Work
π§ What is SQL?
SQL (Structured Query Language) is used to communicate with databases.
π In simple words: SQL helps you store, retrieve, update, and delete data.
Think like this π
Excel β You manually filter data
SQL β You write a query β Data comes instantly β‘
π What is a Database?
A database is a place where data is stored in an organized way.
Example: Student records, Employee data, Orders from an e-commerce website
π Types of Databases
1οΈβ£ Relational Database (RDBMS)
- Data stored in tables (rows & columns)
- Uses SQL
- Example: MySQL, PostgreSQL
2οΈβ£ Non-Relational Database (NoSQL)
- Data stored as JSON, documents, key-value
- Flexible structure
- Example: MongoDB
π§© Key Terms You Must Know
- Table β Like Excel sheet
- Row β One record (one entry)
- Column β One field (like name, age)
- Primary Key β Unique ID (no duplicates)
Example Table:
id name salary
1 Amit 50000
2 Ravi 60000
βοΈ How SQL Works (Simple Flow)
1οΈβ£ You write a query
2οΈβ£ Database processes it
3οΈβ£ Result is returned
Example: SELECT * FROM employees;
π This means: βGive me all data from employees tableβ
π‘ Real-Life Example
Imagine Swiggy/Zomato π When you search βPizzaβ:
π SQL runs in background
π Fetches restaurants with pizza
π Shows results instantly
π― Your Task Today
β Install MySQL Workbench or PostgreSQL
β Understand tables, rows, columns
β Run your first query (SELECT *)
β Explore any sample database
π₯ Pro Tip
Donβt just read β Try everything practically
SQL is 90% practice, 10% theory
Double Tap β€οΈ For More
Letβs start with the first topic of the SQL Roadmap:
β What is SQL & How Databases Work
π§ What is SQL?
SQL (Structured Query Language) is used to communicate with databases.
π In simple words: SQL helps you store, retrieve, update, and delete data.
Think like this π
Excel β You manually filter data
SQL β You write a query β Data comes instantly β‘
π What is a Database?
A database is a place where data is stored in an organized way.
Example: Student records, Employee data, Orders from an e-commerce website
π Types of Databases
1οΈβ£ Relational Database (RDBMS)
- Data stored in tables (rows & columns)
- Uses SQL
- Example: MySQL, PostgreSQL
2οΈβ£ Non-Relational Database (NoSQL)
- Data stored as JSON, documents, key-value
- Flexible structure
- Example: MongoDB
π§© Key Terms You Must Know
- Table β Like Excel sheet
- Row β One record (one entry)
- Column β One field (like name, age)
- Primary Key β Unique ID (no duplicates)
Example Table:
id name salary
1 Amit 50000
2 Ravi 60000
βοΈ How SQL Works (Simple Flow)
1οΈβ£ You write a query
2οΈβ£ Database processes it
3οΈβ£ Result is returned
Example: SELECT * FROM employees;
π This means: βGive me all data from employees tableβ
π‘ Real-Life Example
Imagine Swiggy/Zomato π When you search βPizzaβ:
π SQL runs in background
π Fetches restaurants with pizza
π Shows results instantly
π― Your Task Today
β Install MySQL Workbench or PostgreSQL
β Understand tables, rows, columns
β Run your first query (SELECT *)
β Explore any sample database
π₯ Pro Tip
Donβt just read β Try everything practically
SQL is 90% practice, 10% theory
Double Tap β€οΈ For More
β€42
What does SQL stand for?
Anonymous Quiz
6%
A. Structured Question Language
5%
B. Simple Query Language
87%
C. Structured Query Language
1%
D. Standard Query Logic
β€2π1
What is a database?
Anonymous Quiz
2%
A. A programming language
96%
B. A collection of organized data
1%
C. A type of hardware
1%
D. A web browser
β€4
In a table, what does a βrowβ represent?
Anonymous Quiz
12%
A. A column name
74%
B. A single record
7%
C. A database
7%
D. A query
β€2
Which of the following is an example of a relational database?
Anonymous Quiz
8%
A. Excel
10%
B. MongoDB
81%
C. MySQL
1%
D. Notepad
Which SQL command is used to fetch data from a table?
Anonymous Quiz
10%
A. INSERT
1%
B. DELETE
83%
C. SELECT
6%
D. UPDATE
β€2π₯1
Now, letβs move to the next topic in SQL Roadmap
βοΈ SELECT WHERE
This is the most important beginner topic π
π§ 1. SELECT Statement
β’ SELECT is used to retrieve data from a table
π Basic Syntax
SELECT column_name FROM table_name;
π Example
SELECT name FROM employees;
β’ β Returns only the name column
π Select Multiple Columns
SELECT name, salary FROM employees;
π Select All Columns
SELECT * FROM employees;
π― 2. WHERE Clause (Filtering Data)
β’ WHERE is used to filter records based on conditions
π Syntax
SELECT * FROM table_name
WHERE condition;
π Example
SELECT * FROM employees
WHERE salary > 50000;
β Returns employees earning more than 50k
β‘ 3. Operators You Must Know
πΉ Comparison Operators
β’ = (equal)
β’ > (greater than)
β’ < (less than)
β’ >= , <=
β’ != or <> (not equal)
πΉ Logical Operators
β’ AND β both conditions true
β’ OR β any condition true
β’ NOT β reverse condition
π Example
SELECT * FROM employees
WHERE department = 'IT' AND salary > 50000;
π‘ 4. Real-Life Thinking
Instead of memorizing, think like this:
β’ π βWhat data do I need?β
β’ π βFrom which table?β
β’ π βWhat condition?β
Example:
βShow all HR employees earning less than 40kβ
SELECT * FROM employees
WHERE department = 'HR' AND salary < 40000;
π― 5. Practice Tasks
1. Show all employees with salary > 30k
2. Show employees from IT department
3. Show employees with salary between 40kβ80k
4. Display only names of HR employees
5. Combine conditions using AND / OR
π₯ Practice Tasks Solution
β 1. Show all employees with salary > 30k
SELECT * FROM employees
WHERE salary > 30000;
β 2. Show employees from IT department
SELECT * FROM employees
WHERE department = 'IT';
β 3. Show employees with salary between 40kβ80k
SELECT * FROM employees
WHERE salary BETWEEN 40000 AND 80000;
β’ π Alternative:
SELECT * FROM employees
WHERE salary >= 40000 AND salary <= 80000;
β 4. Display only names of HR employees
SELECT name FROM employees
WHERE department = 'HR';
β 5. Combine conditions using AND / OR
SELECT * FROM employees
WHERE department = 'IT' AND salary > 50000;
β’ π OR example:
SELECT * FROM employees
WHERE department = 'HR' OR salary < 30000;
β‘ Double Tap β€οΈ For More
βοΈ SELECT WHERE
This is the most important beginner topic π
π§ 1. SELECT Statement
β’ SELECT is used to retrieve data from a table
π Basic Syntax
SELECT column_name FROM table_name;
π Example
SELECT name FROM employees;
β’ β Returns only the name column
π Select Multiple Columns
SELECT name, salary FROM employees;
π Select All Columns
SELECT * FROM employees;
π― 2. WHERE Clause (Filtering Data)
β’ WHERE is used to filter records based on conditions
π Syntax
SELECT * FROM table_name
WHERE condition;
π Example
SELECT * FROM employees
WHERE salary > 50000;
β Returns employees earning more than 50k
β‘ 3. Operators You Must Know
πΉ Comparison Operators
β’ = (equal)
β’ > (greater than)
β’ < (less than)
β’ >= , <=
β’ != or <> (not equal)
πΉ Logical Operators
β’ AND β both conditions true
β’ OR β any condition true
β’ NOT β reverse condition
π Example
SELECT * FROM employees
WHERE department = 'IT' AND salary > 50000;
π‘ 4. Real-Life Thinking
Instead of memorizing, think like this:
β’ π βWhat data do I need?β
β’ π βFrom which table?β
β’ π βWhat condition?β
Example:
βShow all HR employees earning less than 40kβ
SELECT * FROM employees
WHERE department = 'HR' AND salary < 40000;
π― 5. Practice Tasks
1. Show all employees with salary > 30k
2. Show employees from IT department
3. Show employees with salary between 40kβ80k
4. Display only names of HR employees
5. Combine conditions using AND / OR
π₯ Practice Tasks Solution
β 1. Show all employees with salary > 30k
SELECT * FROM employees
WHERE salary > 30000;
β 2. Show employees from IT department
SELECT * FROM employees
WHERE department = 'IT';
β 3. Show employees with salary between 40kβ80k
SELECT * FROM employees
WHERE salary BETWEEN 40000 AND 80000;
β’ π Alternative:
SELECT * FROM employees
WHERE salary >= 40000 AND salary <= 80000;
β 4. Display only names of HR employees
SELECT name FROM employees
WHERE department = 'HR';
β 5. Combine conditions using AND / OR
SELECT * FROM employees
WHERE department = 'IT' AND salary > 50000;
β’ π OR example:
SELECT * FROM employees
WHERE department = 'HR' OR salary < 30000;
β‘ Double Tap β€οΈ For More
1β€22π1
What will this query return?
SELECT name FROM employees;
SELECT name FROM employees;
Anonymous Quiz
8%
A. All columns
88%
B. Only names of employees
1%
C. Only salaries
3%
D. Table structure
β€2
What does this query do?
SELECT * FROM employees WHERE department = 'HR';
SELECT * FROM employees WHERE department = 'HR';
Anonymous Quiz
6%
A. Shows all employees
90%
B. Shows only HR employees
2%
C. Deletes HR employees
2%
D. Updates HR employees
β€2π₯°1
Which operator is used to combine multiple conditions?
Anonymous Quiz
51%
A. JOIN
43%
B. AND
4%
C. SELECT
2%
D. ORDER
β€3
Now, Letβs move to the next topic of the SQL Roadmap:
ORDER BY LIMIT
π§ 1. ORDER BY (Sorting Data)
ORDER BY is used to sort your result.
π Syntax
πΉ Ascending Order (Default)
β Lowest salary β highest
πΉ Descending Order
β Highest salary β lowest
π‘ 2. Sorting Multiple Columns
π First sorts by department
π Then salary within each department
π― 3. LIMIT (Control Output Size)
LIMIT is used to restrict the number of rows.
π Syntax
π Example
β Returns only the first 5 rows
β‘ 4. Using ORDER BY LIMIT
π Top 5 highest salaries
π Lowest 3 salaries
π― 5. Practice Tasks
1. Show all employees sorted by salary (ascending)
2. Show all employees sorted by salary (descending)
3. Get top 3 highest paid employees
4. Get lowest 2 salary employees
5. Sort employees by department and salary
β Practice Task Solution
β 1. Show all employees sorted by salary (ascending)
β 2. Show all employees sorted by salary (descending)
β 3. Get top 3 highest paid employees
β 4. Get lowest 2 salary employees
β 5. Sort employees by department and salary
π First sorts by department
π Then highest salary inside each department
β‘ Mini Challenge π₯
π Get the 2nd highest salary employee.
β‘ Mini Challenge Solution π₯
β Method 1 (Using LIMIT + OFFSET)
β Method 2 (Alternative way)
π₯ Pro Tip:
If you understand OFFSET β you can get Top N, 2nd highest, 3rd highest easily.
β‘ Double Tap β€οΈ For More
ORDER BY LIMIT
π§ 1. ORDER BY (Sorting Data)
ORDER BY is used to sort your result.
π Syntax
SELECT column_name FROM table_name
ORDER BY column_name;
πΉ Ascending Order (Default)
SELECT * FROM employees
ORDER BY salary ASC;
β Lowest salary β highest
πΉ Descending Order
SELECT * FROM employees
ORDER BY salary DESC;
β Highest salary β lowest
π‘ 2. Sorting Multiple Columns
SELECT * FROM employees
ORDER BY department ASC, salary DESC;
π First sorts by department
π Then salary within each department
π― 3. LIMIT (Control Output Size)
LIMIT is used to restrict the number of rows.
π Syntax
SELECT * FROM table_name
LIMIT number;
π Example
SELECT * FROM employees
LIMIT 5;
β Returns only the first 5 rows
β‘ 4. Using ORDER BY LIMIT
π Top 5 highest salaries
SELECT * FROM employees
ORDER BY salary DESC
LIMIT 5;
π Lowest 3 salaries
SELECT * FROM employees
ORDER BY salary ASC
LIMIT 3;
π― 5. Practice Tasks
1. Show all employees sorted by salary (ascending)
2. Show all employees sorted by salary (descending)
3. Get top 3 highest paid employees
4. Get lowest 2 salary employees
5. Sort employees by department and salary
β Practice Task Solution
β 1. Show all employees sorted by salary (ascending)
SELECT * FROM employees
ORDER BY salary ASC;
β 2. Show all employees sorted by salary (descending)
SELECT * FROM employees
ORDER BY salary DESC;
β 3. Get top 3 highest paid employees
SELECT * FROM employees
ORDER BY salary DESC
LIMIT 3;
β 4. Get lowest 2 salary employees
SELECT * FROM employees
ORDER BY salary ASC
LIMIT 2;
β 5. Sort employees by department and salary
SELECT * FROM employees
ORDER BY department ASC, salary DESC;
π First sorts by department
π Then highest salary inside each department
β‘ Mini Challenge π₯
π Get the 2nd highest salary employee.
β‘ Mini Challenge Solution π₯
β Method 1 (Using LIMIT + OFFSET)
SELECT * FROM employees
ORDER BY salary DESC
LIMIT 1 OFFSET 1;
β Method 2 (Alternative way)
SELECT * FROM employees
ORDER BY salary DESC
LIMIT 1, 1;
π₯ Pro Tip:
If you understand OFFSET β you can get Top N, 2nd highest, 3rd highest easily.
β‘ Double Tap β€οΈ For More
β€24