Data Analyst Interview Resources
50.9K subscribers
251 photos
1 video
51 files
313 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
The job search journey can be tough, but every step you take brings you closer to your goal. Customizing resumes and cover letters, practicing coding challenges, and staying on top of industry trends are all part of the path to success. Remember, you only need one "yes" to change everything.

There are a lot of amazing people out there looking for that one opportunity. Every application you send, every new connection you make, and all those late nights spent refining your portfolio or building professional relationships are steps toward landing the right job. It can be really exhausting, but every bit of effort gets you closer to your goal.

The process can be filled with doubts and uncertainties, but having a structured approach and setting daily goals can help manage it. Joining professional groups, attending webinars, and seeking mentorship are also great ways to gain insights and stay motivated.

In the end, all the time and energy you invest—whether it’s perfecting a project, learning a new tool, or reaching out to potential mentors—pays off. So, if you’re looking for a job, keep learning, applying, and networking.
2👏1
SQL Interview Questions for 0-1 year of Experience (Asked in Top Product-Based Companies).

Sharpen your SQL skills with these real interview questions!

Q1. Customer Purchase Patterns -
You have two tables, Customers and Purchases: CREATE TABLE Customers ( customer_id INT PRIMARY KEY, customer_name VARCHAR(255) ); CREATE TABLE Purchases ( purchase_id INT PRIMARY KEY, customer_id INT, product_id INT, purchase_date DATE );
Assume necessary INSERT statements are already executed.
Write an SQL query to find the names of customers who have purchased more than 5 different products within the last month. Order the result by customer_name.

Q2. Call Log Analysis -
Suppose you have a CallLogs table: CREATE TABLE CallLogs ( log_id INT PRIMARY KEY, caller_id INT, receiver_id INT, call_start_time TIMESTAMP, call_end_time TIMESTAMP );
Assume necessary INSERT statements are already executed.
Write a query to find the average call duration per user. Include only users who have made more than 10 calls in total. Order the result by average duration descending.

Q3. Employee Project Allocation - Consider two tables, Employees and Projects:
CREATE TABLE Employees ( employee_id INT PRIMARY KEY, employee_name VARCHAR(255), department VARCHAR(255) ); CREATE TABLE Projects ( project_id INT PRIMARY KEY, lead_employee_id INT, project_name VARCHAR(255), start_date DATE, end_date DATE );
Assume necessary INSERT statements are already executed.
The goal is to write an SQL query to find the names of employees who have led more than 3 projects in the last year. The result should be ordered by the number of projects led.
2
SQL Interview Questions !!

🎗 Write a query to find all employees whose salaries exceed the company's average salary.
🎗 Write a query to retrieve the names of employees who work in the same department as 'John Doe'.
🎗 Write a query to display the second highest salary from the Employee table without using the MAX function twice.
🎗 Write a query to find all customers who have placed more than five orders.
🎗 Write a query to count the total number of orders placed by each customer.
🎗 Write a query to list employees who joined the company within the last 6 months.
🎗 Write a query to calculate the total sales amount for each product.
🎗 Write a query to list all products that have never been sold.
🎗 Write a query to remove duplicate rows from a table.
🎗 Write a query to identify the top 10 customers who have not placed any orders in the past year.

Here you can find essential SQL Interview Resources👇
https://t.me/mysqldata

Like this post if you need more 👍❤️

Hope it helps :)
1👍1
Top 10 SQL interview questions with solutions by @sqlspecialist

1. What is the difference between WHERE and HAVING?

Solution:

WHERE filters rows before aggregation.

HAVING filters rows after aggregation.

SELECT department, AVG(salary)
FROM employees
WHERE salary > 3000
GROUP BY department
HAVING AVG(salary) > 5000;


2. Write a query to find the second-highest salary.

Solution:

SELECT MAX(salary) AS second_highest_salary
FROM employees
WHERE salary < (SELECT MAX(salary) FROM employees);



3. How do you fetch the first 5 rows of a table?

Solution:

SELECT * FROM employees
LIMIT 5; -- (MySQL/PostgreSQL)

For SQL Server:

SELECT TOP 5 * FROM employees;



4. Write a query to find duplicate records in a table.

Solution:

SELECT column1, column2, COUNT(*)
FROM table_name
GROUP BY column1, column2
HAVING COUNT(*) > 1;



5. How do you find employees who don’t belong to any department?

Solution:

SELECT * 
FROM employees
WHERE department_id IS NULL;


6. What is a JOIN, and write a query to fetch data using INNER JOIN.

Solution:
A JOIN combines rows from two or more tables based on a related column.

SELECT e.name, d.department_name
FROM employees e
INNER JOIN departments d ON e.department_id = d.id;


7. Write a query to find the total number of employees in each department.

Solution:

SELECT department_id, COUNT(*) AS total_employees
FROM employees
GROUP BY department_id;


8. How do you fetch the current date in SQL?

Solution:

SELECT CURRENT_DATE; -- MySQL/PostgreSQL
SELECT GETDATE(); -- SQL Server


9. Write a query to delete duplicate rows but keep one.

Solution:

WITH CTE AS (
SELECT *, ROW_NUMBER() OVER (PARTITION BY column1, column2 ORDER BY id) AS rn
FROM table_name
)
DELETE FROM CTE WHERE rn > 1;


10. What is a Common Table Expression (CTE), and how do you use it?

Solution:
A CTE is a temporary result set defined within a query.

WITH EmployeeCTE AS (
SELECT department_id, COUNT(*) AS total_employees
FROM employees
GROUP BY department_id
)
SELECT * FROM EmployeeCTE WHERE total_employees > 10;



Hope it helps :)

#sql #dataanalysts
3
Junior-level Data Analyst interview questions:

Introduction and Background

1. Can you tell me about your background and how you became interested in data analysis?
2. What do you know about our company/organization?
3. Why do you want to work as a data analyst?

Data Analysis and Interpretation

1. What is your experience with data analysis tools like Excel, SQL, or Tableau?
2. How would you approach analyzing a large dataset to identify trends and patterns?
3. Can you explain the concept of correlation versus causation?
4. How do you handle missing or incomplete data?
5. Can you walk me through a time when you had to interpret complex data results?

Technical Skills

1. Write a SQL query to extract data from a database.
2. How do you create a pivot table in Excel?
3. Can you explain the difference between a histogram and a box plot?
4. How do you perform data visualization using Tableau or Power BI?
5. Can you write a simple Python or R script to manipulate data?

Statistics and Math

1. What is the difference between mean, median, and mode?
2. Can you explain the concept of standard deviation and variance?
3. How do you calculate probability and confidence intervals?
4. Can you describe a time when you applied statistical concepts to a real-world problem?
5. How do you approach hypothesis testing?

Communication and Storytelling

1. Can you explain a complex data concept to a non-technical person?
2. How do you present data insights to stakeholders?
3. Can you walk me through a time when you had to communicate data results to a team?
4. How do you create effective data visualizations?
5. Can you tell a story using data?

Case Studies and Scenarios

1. You are given a dataset with customer purchase history. How would you analyze it to identify trends?
2. A company wants to increase sales. How would you use data to inform marketing strategies?
3. You notice a discrepancy in sales data. How would you investigate and resolve the issue?
4. Can you describe a time when you had to work with a stakeholder to understand their data needs?
5. How would you prioritize data projects with limited resources?

Behavioral Questions

1. Can you describe a time when you overcame a difficult data analysis challenge?
2. How do you handle tight deadlines and multiple projects?
3. Can you tell me about a project you worked on and your role in it?
4. How do you stay up-to-date with new data tools and technologies?
5. Can you describe a time when you received feedback on your data analysis work?

Final Questions

1. Do you have any questions about the company or role?
2. What do you think sets you apart from other candidates?
3. Can you summarize your experience and qualifications?
4. What are your long-term career goals?

Hope this helps you 😊
4
Top 10 Python Interview Questions with Solutions

1️⃣ What is the difference between a list and a tuple?
⦁ List: mutable, defined with []
⦁ Tuple: immutable, defined with ()
lst = [1, 2, 3]
tpl = (1, 2, 3)


2️⃣ How to reverse a string in Python?
s = "Hello"
rev = s[::-1]  # 'olleH'


3️⃣ Write a function to find factorial using recursion.
def factorial(n):
    return 1 if n == 0 else n * factorial(n-1)


4️⃣ How do you handle exceptions?
⦁ Use try and except blocks.
try:
    x = 1 / 0
except ZeroDivisionError:
    print("Cannot divide by zero")


5️⃣ Difference between == and is?
== compares values
is compares identities (memory locations)

6️⃣ How to check if a number is prime?
def is_prime(n):
    if n < 2:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True


7️⃣ What are list comprehensions? Give example.
⦁ Compact way to create lists
squares = [x*x for x in range(5)]


8️⃣ How to merge two dictionaries?
⦁ Python 3.9+
d1 = {'a':1}
d2 = {'b':2}
merged = d1 | d2


9️⃣ Explain *args and **kwargs.
*args: variable number of positional arguments
**kwargs: variable number of keyword arguments

10️⃣ How do you read a file in Python?
with open('file.txt', 'r') as f:
    data = f.read()


Python Interview Resources: https://whatsapp.com/channel/0029VaiM08SDuMRaGKd9Wv0L

Tap ❤️ for more
3
Python Interview Questions with Answers Part-1: ☑️

1. What is Python and why is it popular for data analysis? 
   Python is a high-level, interpreted programming language known for simplicity and readability. It’s popular in data analysis due to its rich ecosystem of libraries like Pandas, NumPy, and Matplotlib that simplify data manipulation, analysis, and visualization.

2. Differentiate between lists, tuples, and sets in Python.
List: Mutable, ordered, allows duplicates.
Tuple: Immutable, ordered, allows duplicates.
Set: Mutable, unordered, no duplicates.

3. How do you handle missing data in a dataset? 
   Common methods: removing rows/columns with missing values, filling with mean/median/mode, or using interpolation. Libraries like Pandas provide .dropna(), .fillna() functions to do this easily.

4. What are list comprehensions and how are they useful? 
   Concise syntax to create lists from iterables using a single readable line, often replacing loops for cleaner and faster code. 
   Example: [x**2 for x in range(5)] → ``

5. Explain Pandas DataFrame and Series.
Series: 1D labeled array, like a column.
DataFrame: 2D labeled data structure with rows and columns, like a spreadsheet.

6. How do you read data from different file formats (CSV, Excel, JSON) in Python? 
   Using Pandas:
⦁ CSV: pd.read_csv('file.csv')
⦁ Excel: pd.read_excel('file.xlsx')
⦁ JSON: pd.read_json('file.json')

7. What is the difference between Python’s append() and extend() methods?
append() adds its argument as a single element to the end of a list.
extend() iterates over its argument adding each element to the list.

8. How do you filter rows in a Pandas DataFrame? 
   Using boolean indexing: 
   df[df['column'] > value] filters rows where ‘column’ is greater than value.

9. Explain the use of groupby() in Pandas with an example. 
   groupby() splits data into groups based on column(s), then you can apply aggregation. 
   Example: df.groupby('category')['sales'].sum() gives total sales per category.

10. What are lambda functions and how are they used? 
    Anonymous, inline functions defined with lambda keyword. Used for quick, throwaway functions without formally defining with def
    Example: df['new'] = df['col'].apply(lambda x: x*2)

React ♥️ for Part 2
9
🎯 Top 20 SQL Interview Questions You Must Know

SQL is one of the most in-demand skills for Data Analysts.

Here are 20 SQL interview questions that frequently appear in job interviews.

📌 Basic SQL Questions

1️⃣ What is the difference between INNER JOIN and LEFT JOIN?
2️⃣ How does GROUP BY work, and why do we use it?
3️⃣ What is the difference between HAVING and WHERE?
4️⃣ How do you remove duplicate rows from a table?
5️⃣ What is the difference between RANK(), DENSE_RANK(), and ROW_NUMBER()?

📌 Intermediate SQL Questions

6️⃣ How do you find the second highest salary from an Employee table?
7️⃣ What is a Common Table Expression (CTE), and when should you use it?
8️⃣ How do you identify missing values in a dataset using SQL?
9️⃣ What is the difference between UNION and UNION ALL?
🔟 How do you calculate a running total in SQL?

📌 Advanced SQL Questions

1️⃣1️⃣ How does a self-join work? Give an example.
1️⃣2️⃣ What is a window function, and how is it different from GROUP BY?
1️⃣3️⃣ How do you detect and remove duplicate records in SQL?
1️⃣4️⃣ Explain the difference between EXISTS and IN.
1️⃣5️⃣ What is the purpose of COALESCE()?

📌 Real-World SQL Scenarios

1️⃣6️⃣ How do you optimize a slow SQL query?
1️⃣7️⃣ What is indexing in SQL, and how does it improve performance?
1️⃣8️⃣ Write an SQL query to find customers who have placed more than 3 orders.
1️⃣9️⃣ How do you calculate the percentage of total sales for each category?
2️⃣0️⃣ What is the use of CASE statements in SQL?

React with ♥️ if you want me to post the correct answers in next posts! ⬇️

Share with credits: https://t.me/sqlspecialist

Hope it helps :)
5
Data Analyst Interview Questions 📊

🟨 SQL
1️⃣ Write a query to find the second highest salary in the employee table.
SELECT MAX(salary) AS second_highest
FROM employee
WHERE salary < (SELECT MAX(salary) FROM employee);

(Handles ties; alternative: use DENSE_RANK() for modern SQL.)

2️⃣ Get the top 3 products by revenue from sales table.
SELECT product_id, SUM(revenue) AS total_revenue
FROM sales
GROUP BY product_id
ORDER BY total_revenue DESC
LIMIT 3;


3️⃣ Use JOIN to combine customer and order data.
SELECT c.customer_name, o.order_date, o.amount
FROM customers c
INNER JOIN orders o ON c.customer_id = o.customer_id;

(Use INNER for matches; LEFT for all customers.)

4️⃣ Difference between WHERE and HAVING?
WHERE filters rows before grouping; HAVING filters after GROUP BY (e.g., on aggregates like SUM). WHERE is for individual rows, HAVING for grouped results.

5️⃣ Explain INDEX and how it improves performance.
An INDEX speeds up data retrieval by creating a data structure (like a B-tree) for quick lookups on columns. It reduces full table scans but adds overhead on inserts/updates.

🟦 Excel / Power BI
1️⃣ How would you clean messy data in Excel?
Use Text to Columns for splitting, Find & Replace for errors, Remove Duplicates tool, and Power Query for advanced ETL (e.g., trim spaces, handle dates).

2️⃣ What is the difference between Pivot Table and Power Pivot?
Pivot Tables summarize data visually; Power Pivot adds data modeling (relationships, DAX) for larger datasets and complex calculations beyond standard Pivots.

3️⃣ Explain DAX measures vs calculated columns.
Measures are dynamic formulas (e.g., SUM for totals) computed on-the-fly for reports; calculated columns are static, row-by-row computations stored in the model.

4️⃣ How to handle missing values in Power BI?
Use Power Query to replace nulls (e.g., with averages via "Replace Values"), or DAX like IF(ISBLANK()) in visuals. For viz, filter them out or use "Show items with no data."

5️⃣ Create a KPI visual comparing actual vs target sales.
In Power BI, drag KPI visual, add actual sales to Value, target to Target, and trend metric. Set variance to show % difference—green/red indicators highlight performance.

🟩 Python
1️⃣ Write a function to remove outliers from a list using IQR.
import numpy as np
def remove_outliers(data):
Q1 = np.percentile(data, 25)
Q3 = np.percentile(data, 75)
IQR = Q3 - Q1
lower = Q1 - 1.5 * IQR
upper = Q3 + 1.5 * IQR
return [x for x in data if lower <= x <= upper]


2️⃣ Convert a nested list to a flat list.
nested = [[1, 2], [3, 4]]
flat = [item for sublist in nested for item in sublist]
# Or: import itertools; list(itertools.chain.from_iterable(nested))


3️⃣ Read a CSV file and count rows with nulls.
import pandas as pd
df = pd.read_csv('file.csv')
null_counts = df.isnull().sum(axis=1)
print(null_counts[null_counts > 0].count()) # Rows with at least one null


4️⃣ How do you handle missing data in pandas?
Use df.fillna(value) for imputation (e.g., mean), df.dropna() to drop rows/cols, or df.interpolate() for time series. Check with df.isnull().sum() first.

5️⃣ Explain the difference between loc[] and iloc[].
loc[] uses labels (e.g., df.loc['row_label']) for selection; iloc[] uses integer positions (e.g., df.iloc[0:2])—great for slicing by index.

💡 Pro Tip: Practice with mock datasets from Kaggle + build dashboards on Power BI to showcase in interviews.

💬 Tap ❤️ for detailed answers!
4
Data Analytics Interview Questions

1. What is the difference between SQL and MySQL?

SQL is a standard language for retrieving and manipulating structured databases. On the contrary, MySQL is a relational database management system, like SQL Server, Oracle or IBM DB2, that is used to manage SQL databases.


2. What is a Cross-Join?

Cross join can be defined as a cartesian product of the two tables included in the join. The table after join contains the same number of rows as in the cross-product of the number of rows in the two tables. If a WHERE clause is used in cross join then the query will work like an INNER JOIN.


3. What is a Stored Procedure?

A stored procedure is a subroutine available to applications that access a relational database management system (RDBMS). Such procedures are stored in the database data dictionary. The sole disadvantage of stored procedure is that it can be executed nowhere except in the database and occupies more memory in the database server.


4. What is Pattern Matching in SQL?

SQL pattern matching provides for pattern search in data if you have no clue as to what that word should be. This kind of SQL query uses wildcards to match a string pattern, rather than writing the exact word. The LIKE operator is used in conjunction with SQL Wildcards to fetch the required information.
5
How much Power BI is enough to crack a Data Analyst Interview? 📊💡

📌 Basic Power BI Skills
⦁ Connecting to Excel, CSV, SQL, and other data sources
⦁ Understanding Power BI Desktop interface
⦁ Importing & transforming data with Power Query

🔍 Data Modeling
⦁ Relationships: One-to-Many, Many-to-Many
⦁ Primary & foreign keys
⦁ Star schema vs Snowflake schema

📊 Dashboard & Visualization
⦁ Bar, Line, Pie, Donut, Combo charts
⦁ Cards, KPIs, slicers, and filters
⦁ Drill-through & tooltips

🧮 DAX and DQL Functions
⦁ SUM, AVERAGE, COUNTROWS, CALCULATE
⦁ FILTER, ALL, RELATED, IF, SWITCH
⦁ Time Intelligence: TOTALYTD, SAMEPERIODLASTYEAR

🧩 Data Cleaning & Transformation
⦁ Remove duplicates, split columns
⦁ Merge queries, append tables
⦁ Handling missing or inconsistent data

⚙️ Advanced Tips
⦁ Bookmarks & Buttons for interactive dashboards
⦁ Row-level security
⦁ Publishing to Power BI Service & sharing reports

💼 Practical Scenarios
⦁ Sales & revenue analysis
⦁ Employee performance dashboards
⦁ Financial & budget tracking
⦁ Trend & KPI analysis

Must-Have Strengths:
⦁ Quick report building
⦁ Clear & insightful dashboards
⦁ Understanding business metrics
⦁ Transforming raw data into actionable insights

For interviews, focus on data prep, modeling, and DAX. Practice real scenarios to stand out!
2👍1