Interview Question For DA
Interview Question For DA
SQL: 5 questions
Q1: Explain the difference between RANK(), DENSE_RANK(), and ROW_NUMBER()
functions using example.
Q2: Find the nth highest salary from the Employee table.
Q3: You have an employee table with employee ID and manager ID. Find all employees
under a specific manager, including their subordinates at any level.
Q4: Write a query to find the cumulative salary of employees department-wise, who have
joined company in last 30 days.
Q5: Find the top 2 customers with the highest order amount for each product category,
handling ties appropriately. Table: customer (CustomerID, ProductCategory,
OrderAmount)
Q3: Explain Any 5 Chart Types and Their Uses in Representing Different Aspects of Data.
Behavioral: 2 Questions
Q1: Why you want to become a data analyst and why did you apply to this company?
Q2: Describe a time when you had to manage a difficult task with tight deadlines. How
did you handle it?
Power BI:
1. What is meant by Filter context in DAX?
2. Explain the process of implementing Row-Level Security (RLS) in Power BI.
3. Describe the different types of filters available in Power BI.
4. What’s the difference between the ‘ALL’ and ‘ALLSELECTED’ functions in
DAX?
5. How would you use DAX to calculate total sales for a specific product?
Python:
1. Create a dictionary, add elements, update a specific entry, and print the
dictionary sorted by key in alphabetical order.
2. Identify unique values from a list of numbers and print how many times each
value occurs.
3. Find and print the duplicate values in a list of numbers, along with their
frequency.
1 . Tell me about yourself & your roles-responsibilities at your current work place.
3. How to find the values in a text column of a table that start with a certain letter?
5. Find the candidates best suited for an open Data Science job. You want to find
candidates who are proficient in Python, Tableau, and PostgreSQL.(table has two
colunms (name ,skills)).
Power BI:
1. Explain how you would create a dynamic date filter in Power BI for last month’s data.
2. Describe the steps for setting up role-based access in Power BI using Row-Level
Security (RLS).
3. What is the difference between a calculated column and a measure in Power BI?
4. How would you approach building a KPI dashboard that tracks multiple metrics over
time?
Python:
1. Write a Python function to filter out customers who have made more than 5 purchases
in the last 6 months.
2. Create a program that reads a CSV file, extracts unique values in a column, and saves
the results in a new file.
3. Develop a Python script to visualize monthly sales trends for a dataset using
Matplotlib or Seaborn.
— Estimate the number of coffee cups sold in New York City daily.
Power BI Questions:
SQL Questions:
SQL Questions:
1. Describe a scenario where you used SQL to analyze customer data. What insights did
you uncover?
2. Rate your SQL skills on a scale of 1-10 and provide examples of advanced queries
you’ve written.
3. Write a query to identify the second-highest salary in each department.
4. Explain the concept of JOINs and provide a query that joins three tables (Orders,
Customers, Products) to find the top 5 customers by revenue.
5. What is a Common Table Expression (CTE) in SQL, and when would you use it?
Write a CTE query to calculate cumulative monthly sales.
6. Write an SQL query to find all employees whose salaries are above the department
average.
7. Describe your approach to optimizing SQL queries. Can you share an example where
optimization made a noticeable difference?
Python Questions:
1. What Python libraries do you frequently use for data manipulation, and why?
2. How would you write a Python function to calculate moving averages for sales data?
3. Write a Pandas code snippet to remove outliers from a dataset based on the IQR
method.
4. Describe a project where you used Matplotlib or Seaborn for data visualization. What
insights did your visualizations reveal?
5. How would you merge three DataFrames (Sales, Customers, Regions) and compute
the average sales per region?
6. Write a Python code snippet to group data by product category and calculate total
revenue for each category.
7. How do you handle missing data in Python? Share a few imputation techniques you
use.
8. Explain how you would use time series analysis in Python for forecasting monthly
sales.
Follow @prashant_singh for more Such contents
EXL Power Bi Developer Interview Experience(0-3 years)
SQL Questions:
1. Write a SQL query to find the third most recent order date for each customer from a
table Orders (OrderID, CustomerID, OrderDate).
2. Write a query to find the employee with the second-highest salary in a department-
wise ranking.
3. Explain the difference between WHERE and HAVING clauses in SQL.
4. Given a table Sales with columns SaleID, ProductID, Quantity, and Price, write a
query to find the product with the highest total sales revenue.
5. Write a query to calculate the cumulative sales for each product category in the last 90
days.
Power BI Questions:
Power BI Questions:
1. How do you ensure data integrity when combining data from multiple sources in
Power BI?
2. What is the difference between a slicer and a filter in Power BI? When would you use
each?
3. Describe a time when you optimized a Power BI report for performance. What steps
did you take?
4. How do you handle missing values in your Power BI datasets?
5. What techniques can you use to visualize KPI trends effectively in Power BI?
6. How would you create a measure to calculate year-over-year growth in Power BI?
7. Explain how you would implement row-level security in a Power BI report.
8. How do you ensure your Power BI reports are user-friendly for non-technical
stakeholders?
SQL Questions:
2.Write a query to find the nth highest salary from a table Employees with columns
EmployeeID, Name, and Salary.
SELECT DISTINCT Salary
FROM Employees
ORDER BY Salary DESC
LIMIT 1 OFFSET n-1;
3.Replace n with the desired rank (e.g., 2 for the second highest).
Given a table Sales with columns SaleID, ProductID, SaleDate, and Quantity, write a
query to find the total quantity sold for each product per month.
SELECT ProductID, DATE_TRUNC('month', SaleDate) AS Month, SUM(Quantity) AS
TotalQuantity
FROM Sales
GROUP BY ProductID, Month
ORDER BY ProductID, Month;
4.Write a SQL query to find all employees who have more than one manager. Assume
you have a table Employees (EmployeeID, Name, ManagerID).
SELECT EmployeeID, Name
FROM Employees
5.Given a table Orders with columns OrderID, CustomerID, OrderDate, and a table
OrderDetails with columns OrderID, ProductID, Quantity, write a query to find the top
3 products with the highest sales quantity.
6.Write a SQL query to find the second most recent order date for each customer from a
table Orders (OrderID, CustomerID, OrderDate).
9.Given a table Products with columns ProductID, Name, Price, and a table Sales with
columns SaleID, ProductID, Quantity, write a query to find the product with the highest
revenue.
Follow @prashant_singh for more Such contents
SELECT p.ProductID, p.Name, SUM(p.Price * s.Quantity) AS Revenue
FROM Products p
JOIN Sales s ON p.ProductID = s.ProductID
GROUP BY p.ProductID, p.Name
ORDER BY Revenue DESC
LIMIT 1