SQL Interview Questions with Answers
Like for more โค๏ธ
Like for more โค๏ธ
๐6โค4๐ฅฐ2
Hey Guys๐,
The Average Salary Of a Data Scientist is 14LPA
๐๐๐๐จ๐ฆ๐ ๐ ๐๐๐ซ๐ญ๐ข๐๐ข๐๐ ๐๐๐ญ๐ ๐๐๐ข๐๐ง๐ญ๐ข๐ฌ๐ญ ๐๐ง ๐๐จ๐ฉ ๐๐๐๐ฌ๐
We help you master the required skills.
Learn by doing, build Industry level projects
๐ฉโ๐ 1500+ Students Placed
๐ผ 7.2 LPA Avg. Package
๐ฐ 41 LPA Highest Package
๐ค 450+ Hiring Partners
Apply for FREE๐ :
https://go.acciojob.com/RYFvdU
( Limited Slots )
The Average Salary Of a Data Scientist is 14LPA
๐๐๐๐จ๐ฆ๐ ๐ ๐๐๐ซ๐ญ๐ข๐๐ข๐๐ ๐๐๐ญ๐ ๐๐๐ข๐๐ง๐ญ๐ข๐ฌ๐ญ ๐๐ง ๐๐จ๐ฉ ๐๐๐๐ฌ๐
We help you master the required skills.
Learn by doing, build Industry level projects
๐ฉโ๐ 1500+ Students Placed
๐ผ 7.2 LPA Avg. Package
๐ฐ 41 LPA Highest Package
๐ค 450+ Hiring Partners
Apply for FREE๐ :
https://go.acciojob.com/RYFvdU
( Limited Slots )
โค2๐1
Planning for Data Science or Data Engineering Interview.
Focus on SQL & Python first. Here are some important questions which you should know.
๐๐ฆ๐ฉ๐จ๐ซ๐ญ๐๐ง๐ญ ๐๐๐ ๐ช๐ฎ๐๐ฌ๐ญ๐ข๐จ๐ง๐ฌ
1- Find out nth Order/Salary from the tables.
2- Find the no of output records in each join from given Table 1 & Table 2
3- YOY,MOM Growth related questions.
4- Find out Employee ,Manager Hierarchy (Self join related question) or
Employees who are earning more than managers.
5- RANK,DENSERANK related questions
6- Some row level scanning medium to complex questions using CTE or recursive CTE, like (Missing no /Missing Item from the list etc.)
7- No of matches played by every team or Source to Destination flight combination using CROSS JOIN.
8-Use window functions to perform advanced analytical tasks, such as calculating moving averages or detecting outliers.
9- Implement logic to handle hierarchical data, such as finding all descendants of a given node in a tree structure.
10-Identify and remove duplicate records from a table.
๐๐ฆ๐ฉ๐จ๐ซ๐ญ๐๐ง๐ญ ๐๐ฒ๐ญ๐ก๐จ๐ง ๐ช๐ฎ๐๐ฌ๐ญ๐ข๐จ๐ง๐ฌ
1- Reversing a String using an Extended Slicing techniques.
2- Count Vowels from Given words .
3- Find the highest occurrences of each word from string and sort them in order.
4- Remove Duplicates from List.
5-Sort a List without using Sort keyword.
6-Find the pair of numbers in this list whose sum is n no.
7-Find the max and min no in the list without using inbuilt functions.
8-Calculate the Intersection of Two Lists without using Built-in Functions
9-Write Python code to make API requests to a public API (e.g., weather API) and process the JSON response.
10-Implement a function to fetch data from a database table, perform data manipulation, and update the database.
Join for more: https://t.me/datasciencefun
ENJOY LEARNING ๐๐
Focus on SQL & Python first. Here are some important questions which you should know.
๐๐ฆ๐ฉ๐จ๐ซ๐ญ๐๐ง๐ญ ๐๐๐ ๐ช๐ฎ๐๐ฌ๐ญ๐ข๐จ๐ง๐ฌ
1- Find out nth Order/Salary from the tables.
2- Find the no of output records in each join from given Table 1 & Table 2
3- YOY,MOM Growth related questions.
4- Find out Employee ,Manager Hierarchy (Self join related question) or
Employees who are earning more than managers.
5- RANK,DENSERANK related questions
6- Some row level scanning medium to complex questions using CTE or recursive CTE, like (Missing no /Missing Item from the list etc.)
7- No of matches played by every team or Source to Destination flight combination using CROSS JOIN.
8-Use window functions to perform advanced analytical tasks, such as calculating moving averages or detecting outliers.
9- Implement logic to handle hierarchical data, such as finding all descendants of a given node in a tree structure.
10-Identify and remove duplicate records from a table.
๐๐ฆ๐ฉ๐จ๐ซ๐ญ๐๐ง๐ญ ๐๐ฒ๐ญ๐ก๐จ๐ง ๐ช๐ฎ๐๐ฌ๐ญ๐ข๐จ๐ง๐ฌ
1- Reversing a String using an Extended Slicing techniques.
2- Count Vowels from Given words .
3- Find the highest occurrences of each word from string and sort them in order.
4- Remove Duplicates from List.
5-Sort a List without using Sort keyword.
6-Find the pair of numbers in this list whose sum is n no.
7-Find the max and min no in the list without using inbuilt functions.
8-Calculate the Intersection of Two Lists without using Built-in Functions
9-Write Python code to make API requests to a public API (e.g., weather API) and process the JSON response.
10-Implement a function to fetch data from a database table, perform data manipulation, and update the database.
Join for more: https://t.me/datasciencefun
ENJOY LEARNING ๐๐
โค4
Keyboard #Shortcut Keys
Ctrl+A - Select All
Ctrl+B - Bold
Ctrl+C - Copy
Ctrl+D - Fill Down
Ctrl+F - Find
Ctrl+G - Goto
Ctrl+H - Replace
Ctrl+I - Italic
Ctrl+K - Insert Hyperlink
Ctrl+N - New Workbook
Ctrl+O - Open
Ctrl+P - Print
Ctrl+R - Fill Right
Ctrl+S - Save
Ctrl+U - Underline
Ctrl+V - Paste
Ctrl W - Close
Ctrl+X - Cut
Ctrl+Y - Repeat
Ctrl+Z - Undo
F1 - Help
F2 - Edit
F3 - Paste Name
F4 - Repeat last action
F4 - While typing a formula, switch between absolute/relative refs
F5 - Goto
F6 - Next Pane
F7 - Spell check
F8 - Extend mode
F9 - Recalculate all workbooks
F10 - Activate Menu bar
F11 - New Chart
F12 - Save As
Ctrl+: - Insert Current Time
Ctrl+; - Insert Current Date
Ctrl+" - Copy Value from Cell Above
Ctrl+โ - Copy Formula from Cell Above
Shift - Hold down shift for additional functions in Excelโs menu
Shift+F1 - Whatโs This?
Shift+F2 - Edit cell comment
Shift+F3 - Paste function into formula
Shift+F4 - Find Next
Shift+F5 - Find
Shift+F6 - Previous Pane
Shift+F8 - Add to selection
Shift+F9 - Calculate active worksheet
Shift+F10 - Display shortcut menu
Shift+F11 - New worksheet
Ctrl+F3 - Define name
Ctrl+F4 - Close
Ctrl+F5 - XL, Restore window size
Ctrl+F6 - Next workbook window
Shift+Ctrl+F6 - Previous workbook window
Ctrl+F7 - Move window
Ctrl+F8 - Resize window
Ctrl+F9 - Minimize workbook
Ctrl+F10 - Maximize or restore window
Ctrl+F11 - Inset 4.0 Macro sheet
Ctrl+F1 - File Open
Alt+F1 - Insert Chart
Alt+F2 - Save As
Alt+F4 - Exit
Alt+Down arrow - Display AutoComplete list
Alt+โ - Format Style dialog box
Ctrl+Shift+~ - General format
Ctrl+Shift+! - Comma format
Ctrl+Shift+@ - Time format
Ctrl+Shift+# - Date format
Ctrl+Shift+$ - Currency format
Ctrl+Shift+% - Percent format
Ctrl+Shift+^ - Exponential format
Ctrl+Shift+& - Place outline border around selected cells
Ctrl+Shift+_ - Remove outline border
Ctrl+Shift+* - Select current region
Ctrl++ - Insert
Ctrl+- - Delete
Ctrl+1 - Format cells dialog box
Ctrl+2 - Bold
Ctrl+3 - Italic
Ctrl+4 - Underline
Ctrl+5 - Strikethrough
Ctrl+6 - Show/Hide objects
Ctrl+7 - Show/Hide Standard toolbar
Ctrl+8 - Toggle Outline symbols
Ctrl+9 - Hide rows
Ctrl+0 - Hide columns
Ctrl+Shift+( - Unhide rows
Ctrl+Shift+) - Unhide columns
Alt or F10 - Activate the menu
Ctrl+Tab - In toolbar: next toolbar
Shift+Ctrl+Tab - In toolbar: previous toolbar
Ctrl+Tab - In a workbook: activate next workbook
Shift+Ctrl+Tab - In a workbook: activate previous workbook
Tab - Next tool
Shift+Tab - Previous tool
Enter - Do the command
Shift+Ctrl+F - Font Drop down List
Shift+Ctrl+F+F - Font tab of Format Cell Dialog box
Shift+Ctrl+P - Point size Drop down List
Ctrl + E - Align center
Ctrl + J - justify
Ctrl + L - align
Ctrl + R - align right
Alt + Tab - switch applications
Windows + P - Project screen
Windows + E - open file explorer
Windows + D - go to desktop
Windows + M - minimize all windows
Windows + S - search
Ctrl+A - Select All
Ctrl+B - Bold
Ctrl+C - Copy
Ctrl+D - Fill Down
Ctrl+F - Find
Ctrl+G - Goto
Ctrl+H - Replace
Ctrl+I - Italic
Ctrl+K - Insert Hyperlink
Ctrl+N - New Workbook
Ctrl+O - Open
Ctrl+P - Print
Ctrl+R - Fill Right
Ctrl+S - Save
Ctrl+U - Underline
Ctrl+V - Paste
Ctrl W - Close
Ctrl+X - Cut
Ctrl+Y - Repeat
Ctrl+Z - Undo
F1 - Help
F2 - Edit
F3 - Paste Name
F4 - Repeat last action
F4 - While typing a formula, switch between absolute/relative refs
F5 - Goto
F6 - Next Pane
F7 - Spell check
F8 - Extend mode
F9 - Recalculate all workbooks
F10 - Activate Menu bar
F11 - New Chart
F12 - Save As
Ctrl+: - Insert Current Time
Ctrl+; - Insert Current Date
Ctrl+" - Copy Value from Cell Above
Ctrl+โ - Copy Formula from Cell Above
Shift - Hold down shift for additional functions in Excelโs menu
Shift+F1 - Whatโs This?
Shift+F2 - Edit cell comment
Shift+F3 - Paste function into formula
Shift+F4 - Find Next
Shift+F5 - Find
Shift+F6 - Previous Pane
Shift+F8 - Add to selection
Shift+F9 - Calculate active worksheet
Shift+F10 - Display shortcut menu
Shift+F11 - New worksheet
Ctrl+F3 - Define name
Ctrl+F4 - Close
Ctrl+F5 - XL, Restore window size
Ctrl+F6 - Next workbook window
Shift+Ctrl+F6 - Previous workbook window
Ctrl+F7 - Move window
Ctrl+F8 - Resize window
Ctrl+F9 - Minimize workbook
Ctrl+F10 - Maximize or restore window
Ctrl+F11 - Inset 4.0 Macro sheet
Ctrl+F1 - File Open
Alt+F1 - Insert Chart
Alt+F2 - Save As
Alt+F4 - Exit
Alt+Down arrow - Display AutoComplete list
Alt+โ - Format Style dialog box
Ctrl+Shift+~ - General format
Ctrl+Shift+! - Comma format
Ctrl+Shift+@ - Time format
Ctrl+Shift+# - Date format
Ctrl+Shift+$ - Currency format
Ctrl+Shift+% - Percent format
Ctrl+Shift+^ - Exponential format
Ctrl+Shift+& - Place outline border around selected cells
Ctrl+Shift+_ - Remove outline border
Ctrl+Shift+* - Select current region
Ctrl++ - Insert
Ctrl+- - Delete
Ctrl+1 - Format cells dialog box
Ctrl+2 - Bold
Ctrl+3 - Italic
Ctrl+4 - Underline
Ctrl+5 - Strikethrough
Ctrl+6 - Show/Hide objects
Ctrl+7 - Show/Hide Standard toolbar
Ctrl+8 - Toggle Outline symbols
Ctrl+9 - Hide rows
Ctrl+0 - Hide columns
Ctrl+Shift+( - Unhide rows
Ctrl+Shift+) - Unhide columns
Alt or F10 - Activate the menu
Ctrl+Tab - In toolbar: next toolbar
Shift+Ctrl+Tab - In toolbar: previous toolbar
Ctrl+Tab - In a workbook: activate next workbook
Shift+Ctrl+Tab - In a workbook: activate previous workbook
Tab - Next tool
Shift+Tab - Previous tool
Enter - Do the command
Shift+Ctrl+F - Font Drop down List
Shift+Ctrl+F+F - Font tab of Format Cell Dialog box
Shift+Ctrl+P - Point size Drop down List
Ctrl + E - Align center
Ctrl + J - justify
Ctrl + L - align
Ctrl + R - align right
Alt + Tab - switch applications
Windows + P - Project screen
Windows + E - open file explorer
Windows + D - go to desktop
Windows + M - minimize all windows
Windows + S - search
โค5
๐ Walk-in Hiring Drive Alert! ๐
AccioJob x Sceniuz are hiring for Data Analyst & Data Engineer roles!
* Graduation Year: Open to All
* Degree: BTech / BE / BCA / BSC / MTech /ME / MCA / MSC
* CTC: 3โ6 LPA
* Offline Assesment at AccioJob partnered campus in Mumbai
๐๐ป Data Analyst: https://go.acciojob.com/47HSHh
๐๐ป Data Engineer: https://go.acciojob.com/PnRTK2
AccioJob x Sceniuz are hiring for Data Analyst & Data Engineer roles!
* Graduation Year: Open to All
* Degree: BTech / BE / BCA / BSC / MTech /ME / MCA / MSC
* CTC: 3โ6 LPA
* Offline Assesment at AccioJob partnered campus in Mumbai
๐๐ป Data Analyst: https://go.acciojob.com/47HSHh
๐๐ป Data Engineer: https://go.acciojob.com/PnRTK2
โค1
Let's now understand the above Data Analyst Roadmap in detail: ๐ง โ๏ธ
1๏ธโฃ Learn Excel โญ๏ธ
The foundation of data analysis. Learn formulas, pivot tables, charts, VLOOKUP/XLOOKUP, and conditional formatting. It helps in quick data cleaning and presenting insights.
Excel Resources: https://whatsapp.com/channel/0029VaifY548qIzv0u1AHz3i
2๏ธโฃ Learn SQL ๐ป
Essential for working with databases. Focus on
SQL Resources: https://whatsapp.com/channel/0029VanC5rODzgT6TiTGoa1v
3๏ธโฃ Learn Python ๐ฑ
A powerful tool for data manipulation and automation. Master libraries like
Python Resources: https://whatsapp.com/channel/0029VaiM08SDuMRaGKd9Wv0L
4๏ธโฃ Learn Power BI / Tableau ๐
These tools help create interactive dashboards and visual reports. Learn how to import data, create filters, use DAX (Power BI), and design clear visualizations.
Power BI Resources: https://whatsapp.com/channel/0029Vai1xKf1dAvuk6s1v22c
5๏ธโฃ Learn Statistics & Probability ๐
Know about descriptive stats (mean, median, mode), inferential stats, distributions, hypothesis testing, and correlation. Vital for making sense of data trends.
Statistics Resources: https://whatsapp.com/channel/0029Vat3Dc4KAwEcfFbNnZ3O
6๏ธโฃ Learn Data Transformation ๐
Learn how to clean, shape, and prepare data for analysis. Use Python (
Data Cleaning: https://whatsapp.com/channel/0029VarxgFqATRSpdUeHUA27
7๏ธโฃ Learn Machine Learning ๐ง
Understand basic concepts like regression, classification, clustering, and decision trees. You donโt need to be an ML expert, just grasp how models work and when to use them.
Machine Learning: https://whatsapp.com/channel/0029VawtYcJ1iUxcMQoEuP0O
8๏ธโฃ Build Projects & Portfolio ๐น
Apply what youโve learned to real datasetsโlike sales analysis, churn prediction, or dashboard creation. Showcase your work on GitHub or a personal website.
Data Analytics Projects: https://whatsapp.com/channel/0029VbAbnvPLSmbeFYNdNA29
9๏ธโฃ Apply for Jobs ๐ผ
With your skills and portfolio in place, start applying for data analyst roles. Tailor your resume using keywords from job descriptions and prepare to answer SQL and Excel tasks in interviews.
Jobs & Internship Opportunities: https://whatsapp.com/channel/0029VaI5CV93AzNUiZ5Tt226
Share with credits: https://t.me/sqlspecialist
Double Tap โฅ๏ธ for more
1๏ธโฃ Learn Excel โญ๏ธ
The foundation of data analysis. Learn formulas, pivot tables, charts, VLOOKUP/XLOOKUP, and conditional formatting. It helps in quick data cleaning and presenting insights.
Excel Resources: https://whatsapp.com/channel/0029VaifY548qIzv0u1AHz3i
2๏ธโฃ Learn SQL ๐ป
Essential for working with databases. Focus on
SELECT, JOIN, GROUP BY, WHERE, and subqueries to extract and manipulate data from relational databases.SQL Resources: https://whatsapp.com/channel/0029VanC5rODzgT6TiTGoa1v
3๏ธโฃ Learn Python ๐ฑ
A powerful tool for data manipulation and automation. Master libraries like
pandas, numpy, matplotlib, and seaborn for data cleaning and visualization.Python Resources: https://whatsapp.com/channel/0029VaiM08SDuMRaGKd9Wv0L
4๏ธโฃ Learn Power BI / Tableau ๐
These tools help create interactive dashboards and visual reports. Learn how to import data, create filters, use DAX (Power BI), and design clear visualizations.
Power BI Resources: https://whatsapp.com/channel/0029Vai1xKf1dAvuk6s1v22c
5๏ธโฃ Learn Statistics & Probability ๐
Know about descriptive stats (mean, median, mode), inferential stats, distributions, hypothesis testing, and correlation. Vital for making sense of data trends.
Statistics Resources: https://whatsapp.com/channel/0029Vat3Dc4KAwEcfFbNnZ3O
6๏ธโฃ Learn Data Transformation ๐
Learn how to clean, shape, and prepare data for analysis. Use Python (
pandas) or Power Query in Power BI, and understand ETL (Extract, Transform, Load) processes.Data Cleaning: https://whatsapp.com/channel/0029VarxgFqATRSpdUeHUA27
7๏ธโฃ Learn Machine Learning ๐ง
Understand basic concepts like regression, classification, clustering, and decision trees. You donโt need to be an ML expert, just grasp how models work and when to use them.
Machine Learning: https://whatsapp.com/channel/0029VawtYcJ1iUxcMQoEuP0O
8๏ธโฃ Build Projects & Portfolio ๐น
Apply what youโve learned to real datasetsโlike sales analysis, churn prediction, or dashboard creation. Showcase your work on GitHub or a personal website.
Data Analytics Projects: https://whatsapp.com/channel/0029VbAbnvPLSmbeFYNdNA29
9๏ธโฃ Apply for Jobs ๐ผ
With your skills and portfolio in place, start applying for data analyst roles. Tailor your resume using keywords from job descriptions and prepare to answer SQL and Excel tasks in interviews.
Jobs & Internship Opportunities: https://whatsapp.com/channel/0029VaI5CV93AzNUiZ5Tt226
Share with credits: https://t.me/sqlspecialist
Double Tap โฅ๏ธ for more
โค6
Your first SQL script will confuse even yourself.
Your first Power BI dashboard will look like it's your first dashboard.
Stop trying to perfect your first handful of projects.
Start pumping out projects left and right.
While learning, it's more important to create than to focus on optimizing.
Quantity > Quality
Once you start getting faster, you'll have more time to swap it to.
Quality > Quantity
You'll improve rapidly this way.
Your first Power BI dashboard will look like it's your first dashboard.
Stop trying to perfect your first handful of projects.
Start pumping out projects left and right.
While learning, it's more important to create than to focus on optimizing.
Quantity > Quality
Once you start getting faster, you'll have more time to swap it to.
Quality > Quantity
You'll improve rapidly this way.
โค3
Complete Data Analyst Interview Guide (0โ2 Years of Experience)
๐น Round 1: SQL + Scenario-Based Questions
Q1. Get top 3 products by revenue within each category
SELECT *
FROM (
SELECT p.product_id, p.category, SUM(o.revenue) AS total_revenue,
RANK() OVER(PARTITION BY p.category ORDER BY SUM(o.revenue) DESC) AS rnk
FROM products p
JOIN orders o ON p.product_id = o.product_id
GROUP BY p.product_id, p.category
) ranked
WHERE rnk <= 3;
Q2. Find users who purchased in January but not in February
SELECT DISTINCT user_id
FROM orders
WHERE MONTH(order_date) = 1
AND user_id NOT IN (
SELECT user_id FROM orders WHERE MONTH(order_date) = 2
);
Q3. Avg. ride time by city + peak hours
SELECT city, AVG(DATEDIFF(MINUTE, start_time, end_time)) AS avg_ride_mins
FROM trips
GROUP BY city;
-- For peak hour detection (example logic)
SELECT DATEPART(HOUR, start_time) AS ride_hour, COUNT(*) AS ride_count
FROM trips
GROUP BY DATEPART(HOUR, start_time)
ORDER BY ride_count DESC;
โธป
๐น Round 2: Python + Data Cleaning
Q1. Clean messy CSV with pandas
import pandas as pd
df = pd.read_csv('data.csv')
df.columns = df.columns.str.strip().str.lower()
df.drop_duplicates(inplace=True)
df['date'] = pd.to_datetime(df['date'], errors='coerce')
df.fillna(method='ffill', inplace=True)
Q2. Extract domain names from email IDs
emails = ['abc@gmail.com', 'xyz@outlook.com']
domains = [email.split('@')[1] for email in emails]
Q3. Difference: .loc[] vs .iloc[]
โข .loc[] โ label-based selection
โข .iloc[] โ index-based selection
Q4. Handle outliers using IQR
Q1 = df['column'].quantile(0.25)
Q3 = df['column'].quantile(0.75)
IQR = Q3 - Q1
filtered_df = df[(df['column'] >= Q1 - 1.5*IQR) & (df['column'] <= Q3 + 1.5*IQR)]
โธป
๐น Round 3: Power BI / Dashboarding
Tasks you should know:
โข Create a dashboard with weekly trends, margins, churn %
โข Use bookmarks/slicers for KPI toggles
โข Apply filters to show top 5 items dynamically
โข Exclude visuals from slicer using โEdit Interactionsโ โ turn off filter icon on card visual
๐ Try replicating dashboards from Power BI Gallery
โธป
๐น Round 4: Business Case + Logic-Based Thinking
Q1. Sales dropped last quarter โ what to check?
โข Compare YoY/QoQ data
โข Identify categories/geos with the biggest drop
โข Analyze order volume vs. avg. order value
โข Check marketing spend, discounts, stockouts
Q2. App downloads โฌ๏ธ, activity โฌ๏ธ โ whatโs wrong?
โข Check Day 1/7/30 retention
โข Is onboarding working?
โข UI bugs or crashes?
โข Compare install โ sign-up โ usage funnel
Q3. Returns increasing โ how to investigate?
โข Analyze return % by brand, category, SKU
โข Check return reasons (defects, sizing, etc.)
โข Compare returnersโ order history
โข Seasonal impact?
โธป
๐ฐ Free Practice Tools:
โข ๐น SQL on LeetCode
โข ๐น Python on Hackerrank
โข ๐น Power BI Gallery
React โค๏ธ For More
๐น Round 1: SQL + Scenario-Based Questions
Q1. Get top 3 products by revenue within each category
SELECT *
FROM (
SELECT p.product_id, p.category, SUM(o.revenue) AS total_revenue,
RANK() OVER(PARTITION BY p.category ORDER BY SUM(o.revenue) DESC) AS rnk
FROM products p
JOIN orders o ON p.product_id = o.product_id
GROUP BY p.product_id, p.category
) ranked
WHERE rnk <= 3;
Q2. Find users who purchased in January but not in February
SELECT DISTINCT user_id
FROM orders
WHERE MONTH(order_date) = 1
AND user_id NOT IN (
SELECT user_id FROM orders WHERE MONTH(order_date) = 2
);
Q3. Avg. ride time by city + peak hours
SELECT city, AVG(DATEDIFF(MINUTE, start_time, end_time)) AS avg_ride_mins
FROM trips
GROUP BY city;
-- For peak hour detection (example logic)
SELECT DATEPART(HOUR, start_time) AS ride_hour, COUNT(*) AS ride_count
FROM trips
GROUP BY DATEPART(HOUR, start_time)
ORDER BY ride_count DESC;
โธป
๐น Round 2: Python + Data Cleaning
Q1. Clean messy CSV with pandas
import pandas as pd
df = pd.read_csv('data.csv')
df.columns = df.columns.str.strip().str.lower()
df.drop_duplicates(inplace=True)
df['date'] = pd.to_datetime(df['date'], errors='coerce')
df.fillna(method='ffill', inplace=True)
Q2. Extract domain names from email IDs
emails = ['abc@gmail.com', 'xyz@outlook.com']
domains = [email.split('@')[1] for email in emails]
Q3. Difference: .loc[] vs .iloc[]
โข .loc[] โ label-based selection
โข .iloc[] โ index-based selection
Q4. Handle outliers using IQR
Q1 = df['column'].quantile(0.25)
Q3 = df['column'].quantile(0.75)
IQR = Q3 - Q1
filtered_df = df[(df['column'] >= Q1 - 1.5*IQR) & (df['column'] <= Q3 + 1.5*IQR)]
โธป
๐น Round 3: Power BI / Dashboarding
Tasks you should know:
โข Create a dashboard with weekly trends, margins, churn %
โข Use bookmarks/slicers for KPI toggles
โข Apply filters to show top 5 items dynamically
โข Exclude visuals from slicer using โEdit Interactionsโ โ turn off filter icon on card visual
๐ Try replicating dashboards from Power BI Gallery
โธป
๐น Round 4: Business Case + Logic-Based Thinking
Q1. Sales dropped last quarter โ what to check?
โข Compare YoY/QoQ data
โข Identify categories/geos with the biggest drop
โข Analyze order volume vs. avg. order value
โข Check marketing spend, discounts, stockouts
Q2. App downloads โฌ๏ธ, activity โฌ๏ธ โ whatโs wrong?
โข Check Day 1/7/30 retention
โข Is onboarding working?
โข UI bugs or crashes?
โข Compare install โ sign-up โ usage funnel
Q3. Returns increasing โ how to investigate?
โข Analyze return % by brand, category, SKU
โข Check return reasons (defects, sizing, etc.)
โข Compare returnersโ order history
โข Seasonal impact?
โธป
๐ฐ Free Practice Tools:
โข ๐น SQL on LeetCode
โข ๐น Python on Hackerrank
โข ๐น Power BI Gallery
React โค๏ธ For More
โค7
Data Analyst Interview Questions ๐
1.How to create filters in Power BI?
Filters are an integral part of Power BI reports. They are used to slice and dice the data as per the dimensions we want. Filters are created in a couple of ways.
Using Slicers: A slicer is a visual under Visualization Pane. This can be added to the design view to filter our reports. When a slicer is added to the design view, it requires a field to be added to it. For example- Slicer can be added for Country fields. Then the data can be filtered based on countries.
Using Filter Pane: The Power BI team has added a filter pane to the reports, which is a single space where we can add different fields as filters. And these fields can be added depending on whether you want to filter only one visual(Visual level filter), or all the visuals in the report page(Page level filters), or applicable to all the pages of the report(report level filters)
2.How to sort data in Power BI?
Sorting is available in multiple formats. In the data view, a common sorting option of alphabetical order is there. Apart from that, we have the option of Sort by column, where one can sort a column based on another column. The sorting option is available in visuals as well. Sort by ascending and descending option by the fields and measure present in the visual is also available.
3.How to convert pdf to excel?
Open the PDF document you want to convert in XLSX format in Acrobat DC.
Go to the right pane and click on the โExport PDFโ option.
Choose spreadsheet as the Export format.
Select โMicrosoft Excel Workbook.โ
Now click โExport.โ
Download the converted file or share it.
4. How to enable macros in excel?
Click the file tab and then click โOptions.โ
A dialog box will appear. In the โExcel Optionsโ dialog box, click on the โTrust Centerโ and then โTrust Center Settings.โ
Go to the โMacro Settingsโ and select โenable all macros.โ
Click OK to apply the macro settings.
1.How to create filters in Power BI?
Filters are an integral part of Power BI reports. They are used to slice and dice the data as per the dimensions we want. Filters are created in a couple of ways.
Using Slicers: A slicer is a visual under Visualization Pane. This can be added to the design view to filter our reports. When a slicer is added to the design view, it requires a field to be added to it. For example- Slicer can be added for Country fields. Then the data can be filtered based on countries.
Using Filter Pane: The Power BI team has added a filter pane to the reports, which is a single space where we can add different fields as filters. And these fields can be added depending on whether you want to filter only one visual(Visual level filter), or all the visuals in the report page(Page level filters), or applicable to all the pages of the report(report level filters)
2.How to sort data in Power BI?
Sorting is available in multiple formats. In the data view, a common sorting option of alphabetical order is there. Apart from that, we have the option of Sort by column, where one can sort a column based on another column. The sorting option is available in visuals as well. Sort by ascending and descending option by the fields and measure present in the visual is also available.
3.How to convert pdf to excel?
Open the PDF document you want to convert in XLSX format in Acrobat DC.
Go to the right pane and click on the โExport PDFโ option.
Choose spreadsheet as the Export format.
Select โMicrosoft Excel Workbook.โ
Now click โExport.โ
Download the converted file or share it.
4. How to enable macros in excel?
Click the file tab and then click โOptions.โ
A dialog box will appear. In the โExcel Optionsโ dialog box, click on the โTrust Centerโ and then โTrust Center Settings.โ
Go to the โMacro Settingsโ and select โenable all macros.โ
Click OK to apply the macro settings.
โค1
Steps to become a data analyst
Learn the Basics of Data Analysis:
Familiarize yourself with foundational concepts in data analysis, statistics, and data visualization. Online courses and textbooks can help.
Free books & other useful data analysis resources - https://t.me/learndataanalysis
Develop Technical Skills:
Gain proficiency in essential tools and technologies such as:
SQL: Learn how to query and manipulate data in relational databases.
Free Resources- @sqlanalyst
Excel: Master data manipulation, basic analysis, and visualization.
Free Resources- @excel_analyst
Data Visualization Tools: Become skilled in tools like Tableau, Power BI, or Python libraries like Matplotlib and Seaborn.
Free Resources- @PowerBI_analyst
Programming: Learn a programming language like Python or R for data analysis and manipulation.
Free Resources- @pythonanalyst
Statistical Packages: Familiarize yourself with packages like Pandas, NumPy, and SciPy (for Python) or ggplot2 (for R).
Hands-On Practice:
Apply your knowledge to real datasets. You can find publicly available datasets on platforms like Kaggle or create your datasets for analysis.
Build a Portfolio:
Create data analysis projects to showcase your skills. Share them on platforms like GitHub, where potential employers can see your work.
Networking:
Attend data-related meetups, conferences, and online communities. Networking can lead to job opportunities and valuable insights.
Data Analysis Projects:
Work on personal or freelance data analysis projects to gain experience and demonstrate your abilities.
Job Search:
Start applying for entry-level data analyst positions or internships. Look for job listings on company websites, job boards, and LinkedIn.
Jobs & Internship opportunities: @getjobss
Prepare for Interviews:
Practice common data analyst interview questions and be ready to discuss your past projects and experiences.
Continual Learning:
The field of data analysis is constantly evolving. Stay updated with new tools, techniques, and industry trends.
Soft Skills:
Develop soft skills like critical thinking, problem-solving, communication, and attention to detail, as they are crucial for data analysts.
Never ever give up:
The journey to becoming a data analyst can be challenging, with complex concepts and technical skills to learn. There may be moments of frustration and self-doubt, but remember that these are normal parts of the learning process. Keep pushing through setbacks, keep learning, and stay committed to your goal.
ENJOY LEARNING ๐๐
Learn the Basics of Data Analysis:
Familiarize yourself with foundational concepts in data analysis, statistics, and data visualization. Online courses and textbooks can help.
Free books & other useful data analysis resources - https://t.me/learndataanalysis
Develop Technical Skills:
Gain proficiency in essential tools and technologies such as:
SQL: Learn how to query and manipulate data in relational databases.
Free Resources- @sqlanalyst
Excel: Master data manipulation, basic analysis, and visualization.
Free Resources- @excel_analyst
Data Visualization Tools: Become skilled in tools like Tableau, Power BI, or Python libraries like Matplotlib and Seaborn.
Free Resources- @PowerBI_analyst
Programming: Learn a programming language like Python or R for data analysis and manipulation.
Free Resources- @pythonanalyst
Statistical Packages: Familiarize yourself with packages like Pandas, NumPy, and SciPy (for Python) or ggplot2 (for R).
Hands-On Practice:
Apply your knowledge to real datasets. You can find publicly available datasets on platforms like Kaggle or create your datasets for analysis.
Build a Portfolio:
Create data analysis projects to showcase your skills. Share them on platforms like GitHub, where potential employers can see your work.
Networking:
Attend data-related meetups, conferences, and online communities. Networking can lead to job opportunities and valuable insights.
Data Analysis Projects:
Work on personal or freelance data analysis projects to gain experience and demonstrate your abilities.
Job Search:
Start applying for entry-level data analyst positions or internships. Look for job listings on company websites, job boards, and LinkedIn.
Jobs & Internship opportunities: @getjobss
Prepare for Interviews:
Practice common data analyst interview questions and be ready to discuss your past projects and experiences.
Continual Learning:
The field of data analysis is constantly evolving. Stay updated with new tools, techniques, and industry trends.
Soft Skills:
Develop soft skills like critical thinking, problem-solving, communication, and attention to detail, as they are crucial for data analysts.
Never ever give up:
The journey to becoming a data analyst can be challenging, with complex concepts and technical skills to learn. There may be moments of frustration and self-doubt, but remember that these are normal parts of the learning process. Keep pushing through setbacks, keep learning, and stay committed to your goal.
ENJOY LEARNING ๐๐
โค4