Essential Excel Functions for Data Analysts ๐
1๏ธโฃ Basic Functions
SUM() โ Adds a range of numbers. =SUM(A1:A10)
AVERAGE() โ Calculates the average. =AVERAGE(A1:A10)
MIN() / MAX() โ Finds the smallest/largest value. =MIN(A1:A10)
2๏ธโฃ Logical Functions
IF() โ Conditional logic. =IF(A1>50, "Pass", "Fail")
IFS() โ Multiple conditions. =IFS(A1>90, "A", A1>80, "B", TRUE, "C")
AND() / OR() โ Checks multiple conditions. =AND(A1>50, B1<100)
3๏ธโฃ Text Functions
LEFT() / RIGHT() / MID() โ Extract text from a string.
=LEFT(A1, 3) (First 3 characters)
=MID(A1, 3, 2) (2 characters from the 3rd position)
LEN() โ Counts characters. =LEN(A1)
TRIM() โ Removes extra spaces. =TRIM(A1)
UPPER() / LOWER() / PROPER() โ Changes text case.
4๏ธโฃ Lookup Functions
VLOOKUP() โ Searches for a value in a column.
=VLOOKUP(1001, A2:B10, 2, FALSE)
HLOOKUP() โ Searches in a row.
XLOOKUP() โ Advanced lookup replacing VLOOKUP.
=XLOOKUP(1001, A2:A10, B2:B10, "Not Found")
5๏ธโฃ Date & Time Functions
TODAY() โ Returns the current date.
NOW() โ Returns the current date and time.
YEAR(), MONTH(), DAY() โ Extracts parts of a date.
DATEDIF() โ Calculates the difference between two dates.
6๏ธโฃ Data Cleaning Functions
REMOVE DUPLICATES โ Found in the "Data" tab.
CLEAN() โ Removes non-printable characters.
SUBSTITUTE() โ Replaces text within a string.
=SUBSTITUTE(A1, "old", "new")
7๏ธโฃ Advanced Functions
INDEX() & MATCH() โ More flexible alternative to VLOOKUP.
TEXTJOIN() โ Joins text with a delimiter.
UNIQUE() โ Returns unique values from a range.
FILTER() โ Filters data dynamically.
=FILTER(A2:B10, B2:B10>50)
8๏ธโฃ Pivot Tables & Power Query
PIVOT TABLES โ Summarizes data dynamically.
GETPIVOTDATA() โ Extracts data from a Pivot Table.
POWER QUERY โ Automates data cleaning & transformation.
You can find Free Excel Resources here: https://t.me/excel_data
Hope it helps :)
#dataanalytics
1๏ธโฃ Basic Functions
SUM() โ Adds a range of numbers. =SUM(A1:A10)
AVERAGE() โ Calculates the average. =AVERAGE(A1:A10)
MIN() / MAX() โ Finds the smallest/largest value. =MIN(A1:A10)
2๏ธโฃ Logical Functions
IF() โ Conditional logic. =IF(A1>50, "Pass", "Fail")
IFS() โ Multiple conditions. =IFS(A1>90, "A", A1>80, "B", TRUE, "C")
AND() / OR() โ Checks multiple conditions. =AND(A1>50, B1<100)
3๏ธโฃ Text Functions
LEFT() / RIGHT() / MID() โ Extract text from a string.
=LEFT(A1, 3) (First 3 characters)
=MID(A1, 3, 2) (2 characters from the 3rd position)
LEN() โ Counts characters. =LEN(A1)
TRIM() โ Removes extra spaces. =TRIM(A1)
UPPER() / LOWER() / PROPER() โ Changes text case.
4๏ธโฃ Lookup Functions
VLOOKUP() โ Searches for a value in a column.
=VLOOKUP(1001, A2:B10, 2, FALSE)
HLOOKUP() โ Searches in a row.
XLOOKUP() โ Advanced lookup replacing VLOOKUP.
=XLOOKUP(1001, A2:A10, B2:B10, "Not Found")
5๏ธโฃ Date & Time Functions
TODAY() โ Returns the current date.
NOW() โ Returns the current date and time.
YEAR(), MONTH(), DAY() โ Extracts parts of a date.
DATEDIF() โ Calculates the difference between two dates.
6๏ธโฃ Data Cleaning Functions
REMOVE DUPLICATES โ Found in the "Data" tab.
CLEAN() โ Removes non-printable characters.
SUBSTITUTE() โ Replaces text within a string.
=SUBSTITUTE(A1, "old", "new")
7๏ธโฃ Advanced Functions
INDEX() & MATCH() โ More flexible alternative to VLOOKUP.
TEXTJOIN() โ Joins text with a delimiter.
UNIQUE() โ Returns unique values from a range.
FILTER() โ Filters data dynamically.
=FILTER(A2:B10, B2:B10>50)
8๏ธโฃ Pivot Tables & Power Query
PIVOT TABLES โ Summarizes data dynamically.
GETPIVOTDATA() โ Extracts data from a Pivot Table.
POWER QUERY โ Automates data cleaning & transformation.
You can find Free Excel Resources here: https://t.me/excel_data
Hope it helps :)
#dataanalytics
โค4
Top 100 Data Analyst Interview Questions
โ Data Analytics Basics
1. What is data analytics?
2. Difference between data analytics and data science?
3. What problems does a data analyst solve?
4. What are the types of data analytics?
5. What tools do data analysts use daily?
6. What is a KPI?
7. What is a metric vs KPI?
8. What is descriptive analytics?
9. What is diagnostic analytics?
10. What does a typical day of a data analyst look like?
Data and Databases
11. What is structured data?
12. What is semi-structured data?
13. What is unstructured data?
14. What is a database?
15. Difference between OLTP and OLAP?
16. What is a primary key?
17. What is a foreign key?
18. What is a fact table?
19. What is a dimension table?
20. What is a data warehouse?
SQL for Data Analysts
21. What is SELECT used for?
22. Difference between WHERE and HAVING?
23. What is GROUP BY?
24. What are aggregate functions?
25. Difference between INNER and LEFT JOIN?
26. What are subqueries?
27. What is a CTE?
28. How do you handle duplicates in SQL?
29. How do you handle NULL values?
30. What are window functions?
Excel for Data Analysis
31. What are pivot tables?
32. Difference between VLOOKUP and XLOOKUP?
33. What is conditional formatting?
34. What are COUNTIFS and SUMIFS?
35. What is data validation?
36. How do you remove duplicates in Excel?
37. What is IF formula used for?
38. Difference between relative and absolute reference?
39. How do you clean data in Excel?
40. What are common Excel mistakes analysts make?
Data Cleaning and Preparation
41. What is data cleaning?
42. How do you handle missing data?
43. How do you treat outliers?
44. What is data normalization?
45. What is data standardization?
46. How do you check data quality?
47. What is duplicate data?
48. How do you validate source data?
49. What is data transformation?
50. Why is data preparation important?
Statistics for Data Analysts
51. Difference between mean and median?
52. What is standard deviation?
53. What is variance?
54. What is correlation?
55. Difference between correlation and causation?
56. What is an outlier?
57. What is sampling?
58. What is distribution?
59. What is skewness?
60. When do you use median over mean?
Data Visualization
61. Why is data visualization important?
62. Difference between bar and line chart?
63. When do you use a pie chart?
64. What is a dashboard?
65. What makes a good dashboard?
66. What is a KPI card?
67. Common visualization mistakes?
68. How do you choose the right chart?
69. What is drill down?
70. What is data storytelling?
Power BI or Tableau
71. What is Power BI or Tableau used for?
72. What is a data model?
73. What is a relationship?
74. What is DAX?
75. Difference between measure and calculated column?
76. What is Power Query?
77. What are filters and slicers?
78. What is row level security?
79. What is refresh schedule?
80. How do you optimize reports?
Business and Case Questions
81. How do you analyze a sales drop?
82. How do you define success metrics?
83. What business metrics have you worked on?
84. How do you prioritize insights?
85. How do you validate insights?
86. What questions do you ask stakeholders?
87. How do you handle vague requirements?
88. How do you measure business impact?
89. How do you explain numbers to managers?
90. How do you recommend actions?
Projects and Real World
91. Explain your best project.
92. What data sources did you use?
93. How did you clean the data?
94. What insight had the most impact?
95. What challenge did you face?
96. How did you solve it?
97. How did stakeholders use your dashboard?
98. What would you improve in your project?
99. How do you handle tight deadlines?
100. Why should we hire you as a data analyst?
Double Tap โฅ๏ธ For Detailed Answers
โ Data Analytics Basics
1. What is data analytics?
2. Difference between data analytics and data science?
3. What problems does a data analyst solve?
4. What are the types of data analytics?
5. What tools do data analysts use daily?
6. What is a KPI?
7. What is a metric vs KPI?
8. What is descriptive analytics?
9. What is diagnostic analytics?
10. What does a typical day of a data analyst look like?
Data and Databases
11. What is structured data?
12. What is semi-structured data?
13. What is unstructured data?
14. What is a database?
15. Difference between OLTP and OLAP?
16. What is a primary key?
17. What is a foreign key?
18. What is a fact table?
19. What is a dimension table?
20. What is a data warehouse?
SQL for Data Analysts
21. What is SELECT used for?
22. Difference between WHERE and HAVING?
23. What is GROUP BY?
24. What are aggregate functions?
25. Difference between INNER and LEFT JOIN?
26. What are subqueries?
27. What is a CTE?
28. How do you handle duplicates in SQL?
29. How do you handle NULL values?
30. What are window functions?
Excel for Data Analysis
31. What are pivot tables?
32. Difference between VLOOKUP and XLOOKUP?
33. What is conditional formatting?
34. What are COUNTIFS and SUMIFS?
35. What is data validation?
36. How do you remove duplicates in Excel?
37. What is IF formula used for?
38. Difference between relative and absolute reference?
39. How do you clean data in Excel?
40. What are common Excel mistakes analysts make?
Data Cleaning and Preparation
41. What is data cleaning?
42. How do you handle missing data?
43. How do you treat outliers?
44. What is data normalization?
45. What is data standardization?
46. How do you check data quality?
47. What is duplicate data?
48. How do you validate source data?
49. What is data transformation?
50. Why is data preparation important?
Statistics for Data Analysts
51. Difference between mean and median?
52. What is standard deviation?
53. What is variance?
54. What is correlation?
55. Difference between correlation and causation?
56. What is an outlier?
57. What is sampling?
58. What is distribution?
59. What is skewness?
60. When do you use median over mean?
Data Visualization
61. Why is data visualization important?
62. Difference between bar and line chart?
63. When do you use a pie chart?
64. What is a dashboard?
65. What makes a good dashboard?
66. What is a KPI card?
67. Common visualization mistakes?
68. How do you choose the right chart?
69. What is drill down?
70. What is data storytelling?
Power BI or Tableau
71. What is Power BI or Tableau used for?
72. What is a data model?
73. What is a relationship?
74. What is DAX?
75. Difference between measure and calculated column?
76. What is Power Query?
77. What are filters and slicers?
78. What is row level security?
79. What is refresh schedule?
80. How do you optimize reports?
Business and Case Questions
81. How do you analyze a sales drop?
82. How do you define success metrics?
83. What business metrics have you worked on?
84. How do you prioritize insights?
85. How do you validate insights?
86. What questions do you ask stakeholders?
87. How do you handle vague requirements?
88. How do you measure business impact?
89. How do you explain numbers to managers?
90. How do you recommend actions?
Projects and Real World
91. Explain your best project.
92. What data sources did you use?
93. How did you clean the data?
94. What insight had the most impact?
95. What challenge did you face?
96. How did you solve it?
97. How did stakeholders use your dashboard?
98. What would you improve in your project?
99. How do you handle tight deadlines?
100. Why should we hire you as a data analyst?
Double Tap โฅ๏ธ For Detailed Answers
โค19๐1
๐ง SQL Interview Question (ModerateโTricky & Identifying Users with Increasing Transactions)
๐
transactions(transaction_id, user_id, transaction_date, amount)
โ Ques :
๐ Find users whose transaction amount strictly increases with every new transaction.
๐งฉ How Interviewers Expect You to Think
โข Sort transactions by date for each user
โข Compare each amount with the previous one
โข Identify users whose amounts always increase
๐ก SQL Solution
WITH t AS (
SELECT
user_id,
amount,
LAG(amount) OVER (
PARTITION BY user_id
ORDER BY transaction_date
) AS prev_amount
FROM transactions
)
SELECT user_id
FROM t
GROUP BY user_id
HAVING SUM(
CASE
WHEN prev_amount IS NOT NULL AND amount <= prev_amount
THEN 1 ELSE 0
END
) = 0;
๐ฅ Why This Question Is Powerful
โข Tests understanding of LAG() with conditional logic
โข Evaluates ability to validate patterns across sequential data
โข Reflects real-world analytics like tracking user spending growth trends
โค๏ธ React if you want more tricky real interview-level SQL questions ๐
๐
transactions(transaction_id, user_id, transaction_date, amount)
โ Ques :
๐ Find users whose transaction amount strictly increases with every new transaction.
๐งฉ How Interviewers Expect You to Think
โข Sort transactions by date for each user
โข Compare each amount with the previous one
โข Identify users whose amounts always increase
๐ก SQL Solution
WITH t AS (
SELECT
user_id,
amount,
LAG(amount) OVER (
PARTITION BY user_id
ORDER BY transaction_date
) AS prev_amount
FROM transactions
)
SELECT user_id
FROM t
GROUP BY user_id
HAVING SUM(
CASE
WHEN prev_amount IS NOT NULL AND amount <= prev_amount
THEN 1 ELSE 0
END
) = 0;
๐ฅ Why This Question Is Powerful
โข Tests understanding of LAG() with conditional logic
โข Evaluates ability to validate patterns across sequential data
โข Reflects real-world analytics like tracking user spending growth trends
โค๏ธ React if you want more tricky real interview-level SQL questions ๐
โค4
๐๐ผ๐ ๐ฅ๐ฎ๐ ๐๐ฎ๐๐ฎ ๐๐ฒ๐ฐ๐ผ๐บ๐ฒ๐ ๐ฅ๐ฒ๐ฎ๐น ๐๐๐๐ถ๐ป๐ฒ๐๐ ๐ฉ๐ฎ๐น๐๐ฒ
Data creates impact only when it turns into decisions. The analytics process can be seen as a simple journey:
๐น Data โ Raw, messy information collected from systems, users, or transactions.
๐น Sorted โ Cleaning and organizing the data by removing duplicates and fixing inconsistencies.
๐น Arranged โ Analyzing the data through aggregation, grouping, and exploration to find patterns.
๐น Presented Visually โ Using charts and dashboards to make insights easy to understand.
๐น Explained with a Story โ Connecting insights to real business problems and context.
๐น Actionable โ Turning insights into better decisions and improvements.
๐ Great analysts donโt just analyze data โ they turn it into decisions that create value.
Data creates impact only when it turns into decisions. The analytics process can be seen as a simple journey:
๐น Data โ Raw, messy information collected from systems, users, or transactions.
๐น Sorted โ Cleaning and organizing the data by removing duplicates and fixing inconsistencies.
๐น Arranged โ Analyzing the data through aggregation, grouping, and exploration to find patterns.
๐น Presented Visually โ Using charts and dashboards to make insights easy to understand.
๐น Explained with a Story โ Connecting insights to real business problems and context.
๐น Actionable โ Turning insights into better decisions and improvements.
๐ Great analysts donโt just analyze data โ they turn it into decisions that create value.
โค2
๐ Data Analyst Roadmap
First things first ๐
โ Donโt buy expensive courses to become a Data Analyst.
๐ก Consistency > Certifications > Courses
Skills and practice are what actually get you hired.
โ Mandatory Skills for a Data Analyst
1๏ธโฃ SQL
Practice as much as possible.
This is the most important skill for any Data Analyst.
๐ Resource
YouTube Channel: Ankit Bansal
Playlist: SQL Practice / SQL Interview Questions
2๏ธโฃ Excel
Advanced Excel is required.
Focus on:
โข Formulas
โข Pivot Tables
โข Power Query Basics
โข Data Cleaning
โข Data Analysis functions
3๏ธโฃ BI Tools
Choose ONE:
โข Power BI
โข Tableau
โ Do NOT learn both at the same time.
If you choose Power BI, learn these deeply:
โข Power Query
โข DAX
โข M Code
๐ Resources
YouTube Channel: Learnit Training
Video: Power BI DAX Full Tutorial for Beginners
YouTube Channel: Enterprise DNA
Playlist: DAX Practice Series
YouTube Channel: Goodly (Chandeep Chhabra)
Playlists: Power Query Tutorials and M Code Tutorials
4๏ธโฃ Python
Focus mainly on:
โข NumPy
โข Pandas
โข Basic visualization libraries (Matplotlib / Seaborn)
You donโt need deep ML knowledge for Data Analyst roles.
โญ Good-to-Have Skills
These are not mandatory but help in career growth:
โข Machine Learning (basic understanding)
โข PySpark
โข Databricks (becoming popular in data teams)
โข Cloud platforms
Cloud options:
โข Azure
โข GCP
๐ Certifications (Optional)
Certifications can help but are not required.
Useful ones:
โข Microsoft Power BI Certification โ PL-300
โข Tableau Certification
โข Azure Cloud Certification
โ No other certifications are required.
Save your money.
Focus on skills, projects, and practice.
Credit: Mohan
First things first ๐
โ Donโt buy expensive courses to become a Data Analyst.
๐ก Consistency > Certifications > Courses
Skills and practice are what actually get you hired.
โ Mandatory Skills for a Data Analyst
1๏ธโฃ SQL
Practice as much as possible.
This is the most important skill for any Data Analyst.
๐ Resource
YouTube Channel: Ankit Bansal
Playlist: SQL Practice / SQL Interview Questions
2๏ธโฃ Excel
Advanced Excel is required.
Focus on:
โข Formulas
โข Pivot Tables
โข Power Query Basics
โข Data Cleaning
โข Data Analysis functions
3๏ธโฃ BI Tools
Choose ONE:
โข Power BI
โข Tableau
โ Do NOT learn both at the same time.
If you choose Power BI, learn these deeply:
โข Power Query
โข DAX
โข M Code
๐ Resources
YouTube Channel: Learnit Training
Video: Power BI DAX Full Tutorial for Beginners
YouTube Channel: Enterprise DNA
Playlist: DAX Practice Series
YouTube Channel: Goodly (Chandeep Chhabra)
Playlists: Power Query Tutorials and M Code Tutorials
4๏ธโฃ Python
Focus mainly on:
โข NumPy
โข Pandas
โข Basic visualization libraries (Matplotlib / Seaborn)
You donโt need deep ML knowledge for Data Analyst roles.
โญ Good-to-Have Skills
These are not mandatory but help in career growth:
โข Machine Learning (basic understanding)
โข PySpark
โข Databricks (becoming popular in data teams)
โข Cloud platforms
Cloud options:
โข Azure
โข GCP
๐ Certifications (Optional)
Certifications can help but are not required.
Useful ones:
โข Microsoft Power BI Certification โ PL-300
โข Tableau Certification
โข Azure Cloud Certification
โ No other certifications are required.
Save your money.
Focus on skills, projects, and practice.
Credit: Mohan
โค10
๐ง SQL Interview Question (ModerateโTricky & Retention Analysis)
๐
subscriptions(user_id, start_date, end_date)
โ Ques :
๐ Find users who renewed their subscription immediately after the previous one ended (no gap between subscriptions).
๐งฉ How Interviewers Expect You to Think
โข Sort subscriptions by start_date for each user
โข Use a window function to access the previous subscription end date
โข Check if the next start_date equals the previous end_date
๐ก SQL Solution
WITH sub_cte AS (
SELECT
user_id,
start_date,
end_date,
LAG(end_date) OVER (
PARTITION BY user_id
ORDER BY start_date
) AS prev_end_date
FROM subscriptions
)
SELECT DISTINCT user_id
FROM sub_cte
WHERE start_date = prev_end_date;
๐ฅ Why This Question Is Powerful
โข Tests ability to analyze subscription lifecycle data
โข Evaluates knowledge of window functions for sequential comparisons
โข Similar logic used in retention and churn analysis
โค๏ธ React if you want more real interview-level SQL questions like this. ๐
๐
subscriptions(user_id, start_date, end_date)
โ Ques :
๐ Find users who renewed their subscription immediately after the previous one ended (no gap between subscriptions).
๐งฉ How Interviewers Expect You to Think
โข Sort subscriptions by start_date for each user
โข Use a window function to access the previous subscription end date
โข Check if the next start_date equals the previous end_date
๐ก SQL Solution
WITH sub_cte AS (
SELECT
user_id,
start_date,
end_date,
LAG(end_date) OVER (
PARTITION BY user_id
ORDER BY start_date
) AS prev_end_date
FROM subscriptions
)
SELECT DISTINCT user_id
FROM sub_cte
WHERE start_date = prev_end_date;
๐ฅ Why This Question Is Powerful
โข Tests ability to analyze subscription lifecycle data
โข Evaluates knowledge of window functions for sequential comparisons
โข Similar logic used in retention and churn analysis
โค๏ธ React if you want more real interview-level SQL questions like this. ๐
โค4
How to Become a Data Analyst from Scratch! ๐
Whether you're starting fresh or upskilling, here's your roadmap:
โ Master Excel and SQL - solve SQL problems from leetcode & hackerank
โ Get the hang of either Power BI or Tableau - do some hands-on projects
โ learn what the heck ATS is and how to get around it
โ learn to be ready for any interview question
โ Build projects for a data portfolio
โ And you don't need to do it all at once!
โ Fail and learn to pick yourself up whenever required
Whether it's acing interviews or building an impressive portfolio, give yourself the space to learn, fail, and grow. Good things take time โ
Like if it helps โค๏ธ
I have curated best 80+ top-notch Data Analytics Resources ๐๐
https://topmate.io/analyst/861634
Hope it helps :)
Whether you're starting fresh or upskilling, here's your roadmap:
โ Master Excel and SQL - solve SQL problems from leetcode & hackerank
โ Get the hang of either Power BI or Tableau - do some hands-on projects
โ learn what the heck ATS is and how to get around it
โ learn to be ready for any interview question
โ Build projects for a data portfolio
โ And you don't need to do it all at once!
โ Fail and learn to pick yourself up whenever required
Whether it's acing interviews or building an impressive portfolio, give yourself the space to learn, fail, and grow. Good things take time โ
Like if it helps โค๏ธ
I have curated best 80+ top-notch Data Analytics Resources ๐๐
https://topmate.io/analyst/861634
Hope it helps :)
โค1๐1
โ
Power BI Interview Questions ๐ฏ๐
1๏ธโฃ What is Power BI?
A Microsoft tool for data visualization, reporting, and business intelligence.
2๏ธโฃ What are the building blocks of Power BI?
โข Datasets
โข Reports
โข Dashboards
โข Tiles
โข Visualizations
3๏ธโฃ Difference between Power BI Desktop and Power BI Service?
โข Desktop: Used to create and design reports
โข Service: Cloud-based platform to share and collaborate
4๏ธโฃ What is Power Query?
A data transformation tool for cleaning and shaping data before loading into the model.
5๏ธโฃ What is DAX?
Data Analysis Expressions โ a formula language used for calculations in Power BI.
6๏ธโฃ What are measures and calculated columns?
โข Measure: Calculated on aggregation (e.g. SUM of sales)
โข Calculated Column: Row-level computation (e.g. profit = revenue - cost)
7๏ธโฃ What is a slicer?
A visual filter that allows users to dynamically filter data on a report.
8๏ธโฃ How do you handle data refresh in Power BI?
โข Schedule refresh via Power BI Service
โข Use gateways for on-prem data sources
9๏ธโฃ What is the difference between direct query and import mode?
โข Import: Data is loaded into Power BI
โข Direct Query: Queries run directly on the source in real time
๐ What is the Power BI Gateway?
A bridge between on-premise data sources and Power BI cloud service.
๐ฌ Tap โค๏ธ for more
1๏ธโฃ What is Power BI?
A Microsoft tool for data visualization, reporting, and business intelligence.
2๏ธโฃ What are the building blocks of Power BI?
โข Datasets
โข Reports
โข Dashboards
โข Tiles
โข Visualizations
3๏ธโฃ Difference between Power BI Desktop and Power BI Service?
โข Desktop: Used to create and design reports
โข Service: Cloud-based platform to share and collaborate
4๏ธโฃ What is Power Query?
A data transformation tool for cleaning and shaping data before loading into the model.
5๏ธโฃ What is DAX?
Data Analysis Expressions โ a formula language used for calculations in Power BI.
6๏ธโฃ What are measures and calculated columns?
โข Measure: Calculated on aggregation (e.g. SUM of sales)
โข Calculated Column: Row-level computation (e.g. profit = revenue - cost)
7๏ธโฃ What is a slicer?
A visual filter that allows users to dynamically filter data on a report.
8๏ธโฃ How do you handle data refresh in Power BI?
โข Schedule refresh via Power BI Service
โข Use gateways for on-prem data sources
9๏ธโฃ What is the difference between direct query and import mode?
โข Import: Data is loaded into Power BI
โข Direct Query: Queries run directly on the source in real time
๐ What is the Power BI Gateway?
A bridge between on-premise data sources and Power BI cloud service.
๐ฌ Tap โค๏ธ for more
โค7
Useful websites to practice and enhance your Data Analytics skills
๐๐
1. SQL
https://mode.com/sql-tutorial/introduction-to-sql
https://t.me/sqlspecialist/232?single
2. Python
https://www.learnpython.org/
https://bit.ly/3T7y4ta
https://www.geeksforgeeks.org/python-programming-language/learn-python-tutorial
3. R
https://www.datacamp.com/courses/free-introduction-to-r
4. Data Structures
https://leetcode.com/study-plan/data-structure/
https://www.udacity.com/course/data-structures-and-algorithms-in-python--ud513
5. Data Visualization
https://www.freecodecamp.org/learn/data-visualization/
https://www.tableau.com/learn/training/20223
https://www.workout-wednesday.com/power-bi-challenges/
6. Excel
https://excel-practice-online.com/
https://www.w3schools.com/EXCEL/index.php
Join @free4unow_backup for more free courses
ENJOY LEARNING ๐๐
๐๐
1. SQL
https://mode.com/sql-tutorial/introduction-to-sql
https://t.me/sqlspecialist/232?single
2. Python
https://www.learnpython.org/
https://bit.ly/3T7y4ta
https://www.geeksforgeeks.org/python-programming-language/learn-python-tutorial
3. R
https://www.datacamp.com/courses/free-introduction-to-r
4. Data Structures
https://leetcode.com/study-plan/data-structure/
https://www.udacity.com/course/data-structures-and-algorithms-in-python--ud513
5. Data Visualization
https://www.freecodecamp.org/learn/data-visualization/
https://www.tableau.com/learn/training/20223
https://www.workout-wednesday.com/power-bi-challenges/
6. Excel
https://excel-practice-online.com/
https://www.w3schools.com/EXCEL/index.php
Join @free4unow_backup for more free courses
ENJOY LEARNING ๐๐
โค1
๐ง 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 ๐
๐
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 ๐
๐
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://t.me/sqlspecialist
Hope it helps :)
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://t.me/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!
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 ๐
๐
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
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 ๐
๐
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
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
๐ฏ 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 ๐
๐
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
โ 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