Data Analyst Interview Resources
52.3K subscribers
377 photos
1 video
53 files
468 links
Join our telegram channel to learn how data analysis can reveal fascinating patterns, trends, and stories hidden within the numbers! πŸ“Š

For ads & suggestions: @love_data
Download Telegram
🧠 SQL Interview Question (Moderate–Tricky & Top Performer Analysis)
πŸ“Œ

sales(region, salesperson_id, revenue)

❓ Ques :

πŸ‘‰ Find the top 2 highest revenue-generating salespersons in each region.

🧩 How Interviewers Expect You to Think

β€’ Data is grouped by region 🌍
β€’ Need ranking within each group
β€’ Handle ties carefully (RANK / DENSE_RANK)
β€’ Filter top N per group

πŸ’‘ SQL Solution

SELECT region, salesperson_id, revenue
FROM (
SELECT
region,
salesperson_id,
revenue,
DENSE_RANK() OVER (PARTITION BY region ORDER BY revenue DESC) AS rnk
FROM sales
) t
WHERE rnk <= 2;

πŸ”₯ Why This Question Is Powerful

β€’ Tests window functions (RANK / DENSE_RANK) 🧠
β€’ Very common in business reporting & leaderboards πŸ“Š
β€’ Checks understanding of partitioning + ordering logic

❀️ React if you want more such real interview-level SQL questions πŸš€
❀5πŸ‘2
🧠 SQL Interview Question (Moderate–Tricky & Duplicate Detection + Latest Record)
πŸ“Œ

employees(emp_id, email, updated_at)

❓ Ques :

πŸ‘‰ Find duplicate emails, but return only the latest record for each duplicate email.

🧩 How Interviewers Expect You to Think

β€’ Identify duplicates using COUNT() πŸ“Š
β€’ Use window functions for ranking
β€’ Partition by email
β€’ Order by latest timestamp
β€’ Filter only duplicates + latest row

πŸ’‘ SQL Solution

SELECT emp_id, email, updated_at
FROM (
SELECT
emp_id,
email,
updated_at,
COUNT(*) OVER (PARTITION BY email) AS cnt,
ROW_NUMBER() OVER (
PARTITION BY email
ORDER BY updated_at DESC
) AS rn
FROM employees
) t
WHERE cnt > 1
AND rn = 1;

πŸ”₯ Why This Question Is Powerful

β€’ Tests window functions (COUNT OVER, ROW_NUMBER) 🧠
β€’ Combines deduplication + ranking logic
β€’ Very common in data cleaning scenarios 🧹
β€’ Real-world use case: keeping latest user records

❀️ React if you want more such real interview-level SQL questions πŸš€
❀7
Key Power BI Functions Every Analyst Should Master

DAX Functions:

1. CALCULATE():

Purpose: Modify context or filter data for calculations.

Example: CALCULATE(SUM(Sales[Amount]), Sales[Region] = "East")



2. SUM():

Purpose: Adds up column values.

Example: SUM(Sales[Amount])



3. AVERAGE():

Purpose: Calculates the mean of column values.

Example: AVERAGE(Sales[Amount])



4. RELATED():

Purpose: Fetch values from a related table.

Example: RELATED(Customers[Name])



5. FILTER():

Purpose: Create a subset of data for calculations.

Example: FILTER(Sales, Sales[Amount] > 100)



6. IF():

Purpose: Apply conditional logic.

Example: IF(Sales[Amount] > 1000, "High", "Low")



7. ALL():

Purpose: Removes filters to calculate totals.

Example: ALL(Sales[Region])



8. DISTINCT():

Purpose: Return unique values in a column.

Example: DISTINCT(Sales[Product])



9. RANKX():

Purpose: Rank values in a column.

Example: RANKX(ALL(Sales[Region]), SUM(Sales[Amount]))



10. FORMAT():

Purpose: Format numbers or dates as text.

Example: FORMAT(TODAY(), "MM/DD/YYYY")

You can refer these Power BI Interview Resources to learn more: https://whatsapp.com/channel/0029VaGgzAk72WTmQFERKh02

Like this post if you want me to continue this Power BI series πŸ‘β™₯️

Share with credits: https://xn--r1a.website/sqlspecialist

Hope it helps :)
❀5
βœ… How to Grow Fast in Data Analytics πŸ“ˆπŸ’Ό

1️⃣ Master Core Tools
- Excel: Pivot tables, lookups, charts
- SQL: Joins, aggregations, subqueries
- Power BI / Tableau: Dashboards, filters, visuals
- Python: pandas, matplotlib, seaborn for deeper analysis

2️⃣ Learn Key Concepts
- Descriptive stats: mean, median, variance
- Data cleaning: missing values, outliers
- Visualization best practices
- Business KPIs and metrics (e.g., churn rate, CAC, ROI)

3️⃣ Build Practical Projects
- Sales dashboard in Power BI
- SQL analysis of e-commerce data
- Python analysis of COVID-19 trends
- Excel-based budget tracker

4️⃣ Share Your Work
- Post dashboards on LinkedIn
- Upload projects to GitHub
- Record quick YouTube explainers

5️⃣ Join the Community
- LinkedIn groups, Reddit (r/dataisbeautiful), Kaggle
- Attend webinars, local meetups, analytics bootcamps

6️⃣ Stay Current
- Follow Google Analytics, Microsoft BI, Mode
- Subscribe to newsletters: Data Elixir, Analytics Vidhya
- Learn new tools: Looker, BigQuery, Power Query

🎯 Practice daily. Improve weekly. Share monthly.

πŸ’¬ Tap ❀️ if this helped you!
❀7
🧠 SQL Interview Question (Self Join + Salary Comparison)
πŸ“Œ

employees(emp_id, manager_id, salary)

❓ Ques :

πŸ‘‰ Find employees whose salary is higher than their manager’s salary.

🧩 How Interviewers Expect You to Think

β€’ Understand hierarchical relationships πŸ‘₯
β€’ Use self join on same table
β€’ Compare values across related rows
β€’ Handle NULL manager cases

πŸ’‘ SQL Solution

SELECT
e.emp_id,
e.salary AS emp_salary,
m.salary AS manager_salary
FROM employees e
JOIN employees m
ON e.manager_id = m.emp_id
WHERE e.salary > m.salary;

πŸ”₯ Why This Question Is Powerful

β€’ Tests self join concept deeply 🧠
β€’ Real-world scenario in org hierarchy analysis
β€’ Checks ability to compare across rows
β€’ Frequently asked in interviews

❀️ React if you want more real interview-level SQL questions πŸš€
❀2πŸ‘2
Data Analyst Interview Preparation Roadmap βœ…

Technical skills to revise

- SQL
Write queries from scratch.
Practice joins, group by, subqueries.
Handle duplicates and NULLs.
Window functions basics.

- Excel
Pivot tables without help.
XLOOKUP and IF confidently.
Data cleaning steps.

- Power BI or Tableau
Explain data model.
Write basic DAX.
Explain one dashboard end to end.

- Statistics
Mean vs median.
Standard deviation meaning.
Correlation vs causation.

- Python. If required
Pandas basics.
Groupby and filtering.

Interview question types

- SQL questions
Top N per group.
Running totals.
Duplicate records.
Date based queries.

- Business case questions
Why did sales drop.
Which metric matters most and why.

- Dashboard questions
Explain one KPI.
How users will use this report.

- Project questions
Data source.
Cleaning logic.
Key insight.
Business action.

Resume preparation
- Must have Tools section.
- One strong project.
- Metrics driven points.
Example: Improved reporting time by 30 percent using Power BI.

Mock interviews
- Practice explaining out loud.
- Time your answers.
- Use real datasets.

Daily prep plan
1 SQL problem.
1 dashboard review.
10 interview questions.

- Common mistakes
Memorizing queries.
No project explanation.
Weak business reasoning.

- Final task
- Prepare one project story.
- Prepare one SQL solution on paper.
- Prepare one business metric explanation.

Double Tap β™₯️ For More
❀4
🧠 SQL Interview Question (Products Frequently Bought Together)
πŸ“Œ

order_items(order_id, product_id)

❓ Ques :

πŸ‘‰ Find pairs of products that are frequently bought together in the same order

πŸ‘‰ Return product_id_1, product_id_2, pair_count

🧩 How Interviewers Expect You to Think

β€’ Self-join on same order πŸ›’
β€’ Avoid duplicate/reverse pairs
β€’ Count frequency of each pair

πŸ’‘ SQL Solution

SELECT
o1.product_id AS product_id_1,
o2.product_id AS product_id_2,
COUNT(*) AS pair_count
FROM order_items o1
JOIN order_items o2
ON o1.order_id = o2.order_id
AND o1.product_id < o2.product_id
GROUP BY
o1.product_id,
o2.product_id
ORDER BY pair_count DESC;

πŸ”₯ Why This Question Is Powerful

β€’ Classic market basket analysis 🧠
β€’ Tests self-join + combinations logic
β€’ Frequently asked in e-commerce & analytics roles

❀️ React for more SQL interview questions πŸš€
❀7
πŸ“’ Advertising in this channel

You can place an ad via Telegaβ€€io. It takes just a few minutes.

Formats and current rates: View details
πŸ”₯ Top SQL Interview Questions with Answers

🎯 1️⃣ Find 2nd Highest Salary
πŸ“Š Table: employees
id | name | salary
1 | Rahul | 50000
2 | Priya | 70000
3 | Amit | 60000
4 | Neha | 70000

❓ Problem Statement: Find the second highest distinct salary from the employees table.

βœ… Solution
SELECT MAX(salary) FROM employees WHERE salary < ( SELECT MAX(salary) FROM employees );

🎯 2️⃣ Find Nth Highest Salary
πŸ“Š Table: employees
id | name | salary
1 | A | 100
2 | B | 200
3 | C | 300
4 | D | 200

❓ Problem Statement: Write a query to find the 3rd highest salary.

βœ… Solution
SELECT salary FROM ( SELECT salary, DENSE_RANK() OVER(ORDER BY salary DESC) r FROM employees ) t WHERE r = 3;

🎯 3️⃣ Find Duplicate Records
πŸ“Š Table: employees
id | name
1 | Rahul
2 | Amit
3 | Rahul
4 | Neha

❓ Problem Statement: Find all duplicate names in the employees table.

βœ… Solution
SELECT name, COUNT(*) FROM employees GROUP BY name HAVING COUNT(*) > 1;

🎯 4️⃣ Customers with No Orders
πŸ“Š Table: customers
customer_id | name
1 | Rahul
2 | Priya
3 | Amit

πŸ“Š Table: orders
order_id | customer_id
101 | 1
102 | 2

❓ Problem Statement: Find customers who have not placed any orders.

βœ… Solution
SELECT c.name FROM customers c LEFT JOIN orders o ON c.customer_id = o.customer_id WHERE o.customer_id IS NULL;

🎯 5️⃣ Top 3 Salaries per Department
πŸ“Š Table: employees
name | department | salary
A | IT | 100
B | IT | 200
C | IT | 150
D | HR | 120
E | HR | 180

❓ Problem Statement: Find the top 3 highest salaries in each department.

βœ… Solution
SELECT * FROM ( SELECT name, department, salary, ROW_NUMBER() OVER( PARTITION BY department ORDER BY salary DESC ) r FROM employees ) t WHERE r <= 3;

🎯 6️⃣ Running Total of Sales
πŸ“Š Table: sales
date | sales
2024-01-01 | 100
2024-01-02 | 200
2024-01-03 | 300

❓ Problem Statement: Calculate the running total of sales by date.

βœ… Solution
SELECT date, sales, SUM(sales) OVER(ORDER BY date) AS running_total FROM sales;

🎯 7️⃣ Employees Above Average Salary
πŸ“Š Table: employees
name | salary
A | 100
B | 200
C | 300

❓ Problem Statement: Find employees earning more than the average salary.

βœ… Solution
SELECT name, salary FROM employees WHERE salary > ( SELECT AVG(salary) FROM employees );

🎯 8️⃣ Department with Highest Total Salary
πŸ“Š Table: employees
name | department | salary
A | IT | 100
B | IT | 200
C | HR | 500

❓ Problem Statement: Find the department with the highest total salary.

βœ… Solution
SELECT department, SUM(salary) AS total_salary FROM employees GROUP BY department ORDER BY total_salary DESC LIMIT 1;

🎯 9️⃣ Customers Who Placed Orders
πŸ“Š Tables: Same as Q4
❓ Problem Statement: Find customers who have placed at least one order.

βœ… Solution
SELECT name FROM customers c WHERE EXISTS ( SELECT 1 FROM orders o WHERE c.customer_id = o.customer_id );

🎯 πŸ”Ÿ Remove Duplicate Records
πŸ“Š Table: employees
id | name
1 | Rahul
2 | Rahul
3 | Amit

❓ Problem Statement: Delete duplicate records but keep one unique record.

βœ… Solution
DELETE FROM employees WHERE id NOT IN ( SELECT MIN(id) FROM employees GROUP BY name );

πŸš€ Pro Tip:
πŸ‘‰ In interviews:
First explain logic
Then write query
Then optimize

Double Tap β™₯️ For More
❀5πŸŽ‰1
🧠 SQL Interview Question (Detect Negative Account Balance)
πŸ“Œ

transactions(txn_id, txn_date, amount)
(credit = +ve, debit = -ve)

❓ Ques :

πŸ‘‰ Find the first date when account balance becomes negative

πŸ‘‰ Return txn_date

🧩 How Interviewers Expect You to Think

β€’ Calculate running balance over time πŸ’°
β€’ Use cumulative sum
β€’ Track when balance drops below zero
β€’ Return first occurrence

πŸ’‘ SQL Solution

WITH balance_cte AS (
SELECT
txn_date,
SUM(amount) OVER (
ORDER BY txn_date
) AS running_balance
FROM transactions
)

SELECT txn_date
FROM balance_cte
WHERE running_balance < 0
ORDER BY txn_date
LIMIT 1;

πŸ”₯ Why This Question Is Powerful

β€’ Tests cumulative sum (window function) 🧠
β€’ Very common in fintech & transaction analysis
β€’ Checks real-world problem solving ability

❀️ React for more SQL interview questions πŸš€
❀5
7 Misconceptions About Data Analytics (and What’s Actually True): πŸ“ŠπŸš€

❌ You need to be a math or statistics genius
βœ… Basic math + logical thinking is enough. Most real-world analytics is about understanding data, not complex formulas.

❌ You must learn every tool before applying for jobs
βœ… Start with core tools (Excel, SQL, one BI tool). Master fundamentals β€” tools can be learned on the job.

❌ Data analytics is only about numbers
βœ… It’s about storytelling with data β€” explaining insights clearly to non-technical stakeholders.

❌ You need coding skills like a software developer
βœ… Not required. SQL + basic Python/R is enough for most analyst roles. Deep coding is optional, not mandatory.

❌ Analysts just make dashboards all day
βœ… Dashboards are just one part. Real work includes data cleaning, business understanding, ad-hoc analysis, and decision support.

❌ You need huge datasets to be a β€œreal” data analyst
βœ… Even small datasets can provide powerful insights if the questions are right.

❌ Once you learn analytics, your learning is done
βœ… Data analytics evolves constantly β€” new tools, business problems, and techniques mean continuous learning.

πŸ’¬ Tap ❀️ if you agree
❀6
βœ… A-Z Data Science Roadmap (Beginner to Job Ready) πŸ“ŠπŸ§ 

1️⃣ Learn Python Basics
β€’ Variables, data types, loops, functions
β€’ Libraries: NumPy, Pandas

2️⃣ Data Cleaning Manipulation
β€’ Handling missing values, duplicates
β€’ Data wrangling with Pandas
β€’ GroupBy, merge, pivot tables

3️⃣ Data Visualization
β€’ Matplotlib, Seaborn
β€’ Plotly for interactive charts
β€’ Visualizing distributions, trends, relationships

4️⃣ Math for Data Science
β€’ Statistics (mean, median, std, distributions)
β€’ Probability basics
β€’ Linear algebra (vectors, matrices)
β€’ Calculus (for ML intuition)

5️⃣ SQL for Data Analysis
β€’ SELECT, JOIN, GROUP BY, subqueries
β€’ Window functions
β€’ Real-world queries on large datasets

6️⃣ Exploratory Data Analysis (EDA)
β€’ Univariate multivariate analysis
β€’ Outlier detection
β€’ Correlation heatmaps

7️⃣ Machine Learning (ML)
β€’ Supervised vs Unsupervised
β€’ Regression, classification, clustering
β€’ Train-test split, cross-validation
β€’ Overfitting, regularization

8️⃣ ML with scikit-learn
β€’ Linear logistic regression
β€’ Decision trees, random forest, SVM
β€’ K-means clustering
β€’ Model evaluation metrics (accuracy, RMSE, F1)

9️⃣ Deep Learning (Basics)
β€’ Neural networks, activation functions
β€’ TensorFlow / PyTorch
β€’ MNIST digit classifier

πŸ”Ÿ Projects to Build
β€’ Titanic survival prediction
β€’ House price prediction
β€’ Customer segmentation
β€’ Sentiment analysis
β€’ Dashboard + ML combo

1️⃣1️⃣ Tools to Learn
β€’ Jupyter Notebook
β€’ Git GitHub
β€’ Google Colab
β€’ VS Code

1️⃣2️⃣ Model Deployment
β€’ Streamlit, Flask APIs
β€’ Deploy on Render, Heroku or Hugging Face Spaces

1️⃣3️⃣ Communication Skills
β€’ Present findings clearly
β€’ Build dashboards or reports
β€’ Use storytelling with data

1️⃣4️⃣ Portfolio Resume
β€’ Upload projects on GitHub
β€’ Write blogs on Medium/Kaggle
β€’ Create a LinkedIn-optimized profile

πŸ’‘ Pro Tip: Learn by building real projects and explaining them simply!

πŸ’¬ Tap ❀️ for more!
❀7
Data Analytics Interview Questions with Answers Part-1: πŸ“±

1. What is the difference between data analysis and data analytics?
⦁ Data analysis involves inspecting, cleaning, and modeling data to discover useful information and patterns for decision-making.
⦁ Data analytics is a broader process that includes data collection, transformation, analysis, and interpretation, often involving predictive and prescriptive techniques to drive business strategies.

2. Explain the data cleaning process you follow.
⦁ Identify missing, inconsistent, or corrupt data.
⦁ Handle missing data by imputation (mean, median, mode) or removal if appropriate.
⦁ Standardize formats (dates, strings).
⦁ Remove duplicates.
⦁ Detect and treat outliers.
⦁ Validate cleaned data against known business rules.

3. How do you handle missing or duplicate data?
⦁ Missing data: Identify patterns; if random, impute using statistical methods or predictive modeling; else consider domain knowledge before removal.
⦁ Duplicate data: Detect with key fields; remove exact duplicates or merge fuzzy duplicates based on context.

4. What is a primary key in a database? 
A primary key uniquely identifies each record in a table, ensuring entity integrity and enabling relationships between tables via foreign keys.

5. Write a SQL query to find the second highest salary in a table.
SELECT MAX(salary) 
FROM employees
WHERE salary < (SELECT MAX(salary) FROM employees);


6. Explain INNER JOIN vs LEFT JOIN with examples.
⦁ INNER JOIN: Returns only matching rows between two tables.
⦁ LEFT JOIN: Returns all rows from the left table, plus matching rows from the right; if no match, right columns are NULL.

Example:
SELECT * FROM A INNER JOIN B ON A.id = B.id;
SELECT * FROM A LEFT JOIN B ON A.id = B.id;


7. What are outliers? How do you detect and treat them?
⦁ Outliers are data points significantly different from others that can skew analysis.
⦁ Detect with boxplots, z-score (>3), or IQR method (values outside 1.5*IQR).
⦁ Treat by investigating causes, correcting errors, transforming data, or removing if they’re noise.

8. Describe what a pivot table is and how you use it. 
A pivot table is a data summarization tool that groups, aggregates (sum, average), and displays data cross-categorically. Used in Excel and BI tools for quick insights and reporting.

9. How do you validate a data model’s performance?
⦁ Use relevant metrics (accuracy, precision, recall for classification; RMSE, MAE for regression).
⦁ Perform cross-validation to check generalizability.
⦁ Test on holdout or unseen data sets.

10. What is hypothesis testing? Explain t-test and z-test.
⦁ Hypothesis testing assesses if sample data supports a claim about a population.
⦁ t-test: Used when sample size is small and population variance is unknown, often comparing means.
⦁ z-test: Used for large samples with known variance to test population parameters.

React β™₯️ for Part-2
❀8
πŸ”₯ Top SQL Interview Questions with Answers

🎯 1️⃣ Find 2nd Highest Salary
πŸ“Š Table: employees
id | name | salary
1 | Rahul | 50000
2 | Priya | 70000
3 | Amit | 60000
4 | Neha | 70000

❓ Problem Statement: Find the second highest distinct salary from the employees table.

βœ… Solution
SELECT MAX(salary) FROM employees WHERE salary < ( SELECT MAX(salary) FROM employees );

🎯 2️⃣ Find Nth Highest Salary
πŸ“Š Table: employees
id | name | salary
1 | A | 100
2 | B | 200
3 | C | 300
4 | D | 200

❓ Problem Statement: Write a query to find the 3rd highest salary.

βœ… Solution
SELECT salary FROM ( SELECT salary, DENSE_RANK() OVER(ORDER BY salary DESC) r FROM employees ) t WHERE r = 3;

🎯 3️⃣ Find Duplicate Records
πŸ“Š Table: employees
id | name
1 | Rahul
2 | Amit
3 | Rahul
4 | Neha

❓ Problem Statement: Find all duplicate names in the employees table.

βœ… Solution
SELECT name, COUNT(*) FROM employees GROUP BY name HAVING COUNT(*) > 1;

🎯 4️⃣ Customers with No Orders
πŸ“Š Table: customers
customer_id | name
1 | Rahul
2 | Priya
3 | Amit

πŸ“Š Table: orders
order_id | customer_id
101 | 1
102 | 2

❓ Problem Statement: Find customers who have not placed any orders.

βœ… Solution
SELECT c.name FROM customers c LEFT JOIN orders o ON c.customer_id = o.customer_id WHERE o.customer_id IS NULL;

🎯 5️⃣ Top 3 Salaries per Department
πŸ“Š Table: employees
name | department | salary
A | IT | 100
B | IT | 200
C | IT | 150
D | HR | 120
E | HR | 180

❓ Problem Statement: Find the top 3 highest salaries in each department.

βœ… Solution
SELECT * FROM ( SELECT name, department, salary, ROW_NUMBER() OVER( PARTITION BY department ORDER BY salary DESC ) r FROM employees ) t WHERE r <= 3;

🎯 6️⃣ Running Total of Sales
πŸ“Š Table: sales
date | sales
2024-01-01 | 100
2024-01-02 | 200
2024-01-03 | 300

❓ Problem Statement: Calculate the running total of sales by date.

βœ… Solution
SELECT date, sales, SUM(sales) OVER(ORDER BY date) AS running_total FROM sales;

🎯 7️⃣ Employees Above Average Salary
πŸ“Š Table: employees
name | salary
A | 100
B | 200
C | 300

❓ Problem Statement: Find employees earning more than the average salary.

βœ… Solution
SELECT name, salary FROM employees WHERE salary > ( SELECT AVG(salary) FROM employees );

🎯 8️⃣ Department with Highest Total Salary
πŸ“Š Table: employees
name | department | salary
A | IT | 100
B | IT | 200
C | HR | 500

❓ Problem Statement: Find the department with the highest total salary.

βœ… Solution
SELECT department, SUM(salary) AS total_salary FROM employees GROUP BY department ORDER BY total_salary DESC LIMIT 1;

🎯 9️⃣ Customers Who Placed Orders
πŸ“Š Tables: Same as Q4
❓ Problem Statement: Find customers who have placed at least one order.

βœ… Solution
SELECT name FROM customers c WHERE EXISTS ( SELECT 1 FROM orders o WHERE c.customer_id = o.customer_id );

🎯 πŸ”Ÿ Remove Duplicate Records
πŸ“Š Table: employees
id | name
1 | Rahul
2 | Rahul
3 | Amit

❓ Problem Statement: Delete duplicate records but keep one unique record.

βœ… Solution
DELETE FROM employees WHERE id NOT IN ( SELECT MIN(id) FROM employees GROUP BY name );

πŸš€ Pro Tip:
πŸ‘‰ In interviews:
First explain logic
Then write query
Then optimize

Double Tap β™₯️ For More
❀6
πŸ”₯ Power BI Interview Q&A ( Frequently Asked πŸ”₯)

πŸ“Š Q1. What is the difference between a calculated column and a measure?

πŸ‘‰ Calculated Column β†’ Row-level, stored in memory
πŸ‘‰ Measure β†’ Aggregated, calculated on the fly
πŸ‘‰ Use measures for performance & dynamic analysis

πŸ“Š Q2. What is a star schema and why is it important?

πŸ‘‰ Central fact table + surrounding dimension tables
πŸ‘‰ Improves performance & scalability
πŸ‘‰ Makes DAX simpler and more efficient

πŸ“Š Q3. What are filter context and row context in DAX?

πŸ‘‰ Row Context β†’ Works at individual row level
πŸ‘‰ Filter Context β†’ Applies filters across data
πŸ‘‰ Understanding both is key to writing correct DAX

πŸ“Š Q4. What is the use of CALCULATE() in Power BI?

πŸ‘‰ Modifies filter context
πŸ‘‰ Used for advanced calculations
πŸ‘‰ Core function for most complex DAX logic

πŸ“Š Q5. How do you handle missing or null values in Power BI?

πŸ‘‰ Use Power Query (Replace / Fill options)
πŸ‘‰ Handle with DAX (COALESCE, IF)
πŸ‘‰ Ensure clean data before building visuals

πŸ”₯ React with β™₯️ for more such questions
❀3
πŸ”₯ Pandas Interview Q&A (Frequently Asked πŸ”₯)

πŸ“Š Q1. What is Pandas and why is it used?

πŸ‘‰ Python library for data manipulation & analysis
πŸ‘‰ Provides powerful data structures like DataFrame & Series
πŸ‘‰ Used for cleaning, transforming, and analyzing data

πŸ“Š Q2. What is the difference between Series and DataFrame?

πŸ‘‰ Series β†’ 1D labeled array (single column)
πŸ‘‰ DataFrame β†’ 2D tabular structure (rows & columns)
πŸ‘‰ DataFrame is a collection of multiple Series

πŸ“Š Q3. How do you handle missing values in Pandas?

πŸ‘‰ isnull() / notnull() to detect missing values
πŸ‘‰ fillna() to replace missing data
πŸ‘‰ dropna() to remove missing records

πŸ“Š Q4. What is the difference between loc[] and iloc[]?

πŸ‘‰ loc[] β†’ Label-based indexing
πŸ‘‰ iloc[] β†’ Integer position-based indexing
πŸ‘‰ Use loc for named indexes, iloc for numeric positions

πŸ“Š Q5. What is groupby() in Pandas?

πŸ‘‰ Used for splitting data into groups
πŸ‘‰ Apply aggregation functions (sum, mean, count)
πŸ‘‰ Essential for data summarization

πŸ“Š Q6. What is the difference between merge() and concat()?

πŸ‘‰ merge() β†’ SQL-like joins (inner, left, right, outer)
πŸ‘‰ concat() β†’ Stacks data vertically or horizontally
πŸ‘‰ Use merge for relational data combining

πŸ“Š Q7. How do you filter data in Pandas?

πŸ‘‰ Use boolean conditions (df[df['col'] > value])
πŸ‘‰ Multiple conditions using & and |
πŸ‘‰ Helps in extracting specific insights

πŸ“Š Q8. What is apply() function?

πŸ‘‰ Applies a function across rows or columns
πŸ‘‰ Used for custom transformations
πŸ‘‰ More flexible than built-in functions

πŸ”₯ React with β™₯️ for more such questions
❀3
Hello Everyone πŸ‘‹,

We’re excited to announce the launch of our official WhatsApp Channel! πŸŽ‰

Here, you’ll regularly find:
πŸ“’ Data Analytics & Data Science Jobs
πŸ“š Notes and Study Material
πŸ’‘ Career Guidance & Interview Tips

Join this channel to stay updated for free, just like our Telegram community!

πŸ‘‰ Join Now: https://whatsapp.com/channel/0029Vaxjq5a4dTnKNrdeiZ0J

Let’s keep learning and growing together πŸš€
❀2
SQL Interview Questions with Answers Part-1: β˜‘οΈ

1. What is SQL? 
   SQL (Structured Query Language) is a standardized programming language designed to manage and manipulate relational databases. It allows you to query, insert, update, and delete data, as well as create and modify schema objects like tables and views.

2. Differentiate between SQL and NoSQL databases. 
   SQL databases are relational, table-based, and use structured query language with fixed schemas, ideal for complex queries and transactions. NoSQL databases are non-relational, can be document, key-value, graph, or column-oriented, and are schema-flexible, designed for scalability and handling unstructured data.

3. What are the different types of SQL commands?
⦁ DDL (Data Definition Language): CREATE, ALTER, DROP (define and modify structure)
⦁ DML (Data Manipulation Language): SELECT, INSERT, UPDATE, DELETE (data operations)
⦁ DCL (Data Control Language): GRANT, REVOKE (permission control)
⦁ TCL (Transaction Control Language): COMMIT, ROLLBACK, SAVEPOINT (transaction management)

4. Explain the difference between WHERE and HAVING clauses.
⦁ WHERE filters rows before grouping (used with SELECT, UPDATE).
⦁ HAVING filters groups after aggregation (used with GROUP BY), e.g., filtering aggregated results like sums or counts.

5. Write a SQL query to find the second highest salary in a table. 
   Using a subquery:
SELECT MAX(salary) FROM employees  
WHERE salary < (SELECT MAX(salary) FROM employees);

Or using DENSE_RANK():
SELECT salary FROM (  
  SELECT salary, DENSE_RANK() OVER (ORDER BY salary DESC) as rnk 
  FROM employees) t 
WHERE rnk = 2;


6. What is a JOIN? Explain different types of JOINs. 
   A JOIN combines rows from two or more tables based on a related column:
⦁ INNER JOIN: returns matching rows from both tables.
⦁ LEFT JOIN (LEFT OUTER JOIN): all rows from the left table, matched rows from right.
⦁ RIGHT JOIN (RIGHT OUTER JOIN): all rows from right table, matched rows from left.
⦁ FULL JOIN (FULL OUTER JOIN): all rows when there’s a match in either table.
⦁ CROSS JOIN: Cartesian product of both tables.

7. How do you optimize slow-performing SQL queries?
⦁ Use indexes appropriately to speed up lookups.
⦁ Avoid SELECT *; only select necessary columns.
⦁ Use joins carefully; filter early with WHERE clauses.
⦁ Analyze execution plans to identify bottlenecks.
⦁ Avoid unnecessary subqueries; use EXISTS or JOINs.
⦁ Limit result sets with pagination if dealing with large datasets.

8. What is a primary key? What is a foreign key?
⦁ Primary Key: A unique identifier for records in a table; it cannot be NULL.
⦁ Foreign Key: A field that creates a link between two tables by referring to the primary key in another table, enforcing referential integrity.

9. What are indexes? Explain clustered and non-clustered indexes.
⦁ Indexes speed up data retrieval by providing quick lookups.
⦁ Clustered Index: Sorts and stores the actual data rows in the table based on the key; a table can have only one clustered index.
⦁ Non-Clustered Index: Creates a separate structure that points to the data rows; tables can have multiple non-clustered indexes.

10. Write a SQL query to fetch the top 5 records from a table. 
    In SQL Server and PostgreSQL:
SELECT * FROM table_name  
ORDER BY some_column DESC 
LIMIT 5; 

In SQL Server (older syntax):
SELECT TOP 5 * FROM table_name  
ORDER BY some_column DESC; 


React β™₯️ for Part 2
❀1
Most Asked SQL Interview Questions at MAANG CompaniesπŸ”₯πŸ”₯

Preparing for an SQL Interview at MAANG Companies? Here are some crucial SQL Questions you should be ready to tackle:

1. How do you retrieve all columns from a table?

SELECT * FROM table_name;

2. What SQL statement is used to filter records?

SELECT * FROM table_name
WHERE condition;

The WHERE clause is used to filter records based on a specified condition.

3. How can you join multiple tables? Describe different types of JOINs.

SELECT columns
FROM table1
JOIN table2 ON table1.column = table2.column
JOIN table3 ON table2.column = table3.column;

Types of JOINs:

1. INNER JOIN: Returns records with matching values in both tables

SELECT * FROM table1
INNER JOIN table2 ON table1.column = table2.column;

2. LEFT JOIN: Returns all records from the left table & matched records from the right table. Unmatched records will have NULL values.

SELECT * FROM table1
LEFT JOIN table2 ON table1.column = table2.column;

3. RIGHT JOIN: Returns all records from the right table & matched records from the left table. Unmatched records will have NULL values.

SELECT * FROM table1
RIGHT JOIN table2 ON table1.column = table2.column;

4. FULL JOIN: Returns records when there is a match in either left or right table. Unmatched records will have NULL values.

SELECT * FROM table1
FULL JOIN table2 ON table1.column = table2.column;

4. What is the difference between WHERE & HAVING clauses?

WHERE: Filters records before any groupings are made.

SELECT * FROM table_name
WHERE condition;

HAVING: Filters records after groupings are made.

SELECT column, COUNT(*)
FROM table_name
GROUP BY column
HAVING COUNT(*) > value;

5. How do you calculate average, sum, minimum & maximum values in a column?

Average: SELECT AVG(column_name) FROM table_name;

Sum: SELECT SUM(column_name) FROM table_name;

Minimum: SELECT MIN(column_name) FROM table_name;

Maximum: SELECT MAX(column_name) FROM table_name;

Here you can find essential SQL Interview ResourcesπŸ‘‡
https://xn--r1a.website/mysqldata

Like this post if you need more πŸ‘β€οΈ

Hope it helps :)
❀6