TGViewer
Channel Public Channel
Data Analytics

Data Analytics

@sqlspecialist

Perfect channel to learn Data Analytics

Learn SQL, Python, Alteryx, Tableau, Power BI and many more

For Promotions: @coderfun @love_data
Subscribers
111K
Photos
224
Videos
1
Links
951

Showing posts older than #2970 · Back to latest

Older Posts 20 shown
Post #2967 5.85K
𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝗲𝗿:
You have 2 minutes to solve this Excel problem.

You have the following data:

Employee ID | Employee Name | Department
101 | John | IT
102 | Sarah | HR
103 | Mike | Finance
104 | David | Sales

How would you return the Employee Name for Employee ID 103?

𝗠𝗲: Challenge accepted! 💪

=XLOOKUP(103,A2:A5,B2:B5)

💡 Explanation:
The XLOOKUP() function searches for a value in one column and returns the corresponding value from another column.
• 103 is the lookup value.
• A2:A5 is the lookup array containing Employee IDs.
• B2:B5 is the return array containing Employee Names.
The formula returns Mike.

This challenge tests your understanding of:
✅ XLOOKUP()
✅ Lookup Functions
✅ Data Retrieval

🎯 Expected Output Example
Formula Result
=XLOOKUP(103,A2:A5,B2:B5) Mike

🚀 Bonus (For Older Excel Versions)
=INDEX(B2:B5,MATCH(103,A2:A5,0))

Or you can use:
=VLOOKUP(103,A2:C5,2,FALSE)

While VLOOKUP() works, XLOOKUP() is more flexible because it can search both left and right, doesn't require a column index number, and handles missing values more effectively.

🚀 Tip for Excel Job Seekers:
Lookup functions are among the most frequently asked Excel interview topics. Be comfortable with:
XLOOKUP()
VLOOKUP()
HLOOKUP()
INDEX() + MATCH()
XMATCH()

Knowing when to use each one can make a big difference in interviews.

❤️ React with ❤️ for more interview challenges!
  • ❤ 10
Post #2965 6.03K
𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝗲𝗿:
You have 2 minutes to solve this Excel problem.

You have the following data:
Employee | Department | Salary
John | IT | 75,000
Sarah | HR | 60,000
Mike | IT | 82,000
David | Finance | 90,000
Alice | IT | 78,000

How would you calculate the total salary for the IT department?

𝗠𝗲: Challenge accepted! 💪
=SUMIF(B2:B6,"IT",C2:C6)

💡 Explanation:
The SUMIF() function adds values based on a single condition.
• B2:B6 is the range containing department names.
• "IT" is the condition (criteria).
• C2:C6 is the range containing salary values to sum.

Excel adds only the salaries where the department is IT.

This challenge tests your understanding of: ✅ SUMIF()
✅ Conditional Calculations
✅ Data Analysis

🎯 Expected Output Example
Formula: =SUMIF(B2:B6,"IT",C2:C6)
Result: 235,000

(75,000 + 82,000 + 78,000 = 235,000)

🚀 Bonus (Using a Cell Reference as Criteria)
=SUMIF(B2:B6,E2,C2:C6)
If cell E2 contains IT, the formula becomes dynamic and automatically updates when the department name changes.

🚀 Tip for Excel Job Seekers:
SUMIF() is one of the most commonly asked Excel functions. Once you're comfortable with it, move on to:
SUMIFS()
COUNTIF()
COUNTIFS()
AVERAGEIF()
AVERAGEIFS()

These functions are widely used in reporting, dashboards, and data analysis interviews.

❤️ React with ❤️ for more Excel interview challenges!
  • ❤ 24
  • 👍 8
Post #2963 6.7K
𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝗲𝗿:

You have 2 minutes to solve this Excel problem.

You have the following data:

Employee | Sales

John | 12,000

Sarah | 18,000

Mike | 15,000

David | 20,000

How would you find the highest sales value using an Excel formula?

𝗠𝗲: Challenge accepted! 💪

=MAX(B2:B5)


💡 Explanation:

The MAX() function returns the largest value from a range of cells.

B2:B5 is the range containing the sales values.

Excel scans the range and returns the highest number.

In this example, the result will be 20,000.

This challenge tests your understanding of:

✅ Basic Excel Functions

✅ MAX()

✅ Working with Cell Ranges

🎯 Expected Output Example

Formula | Result

=MAX(B2:B5) | 20,000

🚀 Bonus (Return the Employee Name with Highest Sales)

=XLOOKUP(MAX(B2:B5),B2:B5,A2:A5)


If you're using an older version of Excel:

=INDEX(A2:A5,MATCH(MAX(B2:B5),B2:B5,0))


These formulas return David, the employee with the highest sales.

🚀 Tip for Excel Job Seekers:

The MAX() function is frequently combined with:

INDEX()

MATCH()

XLOOKUP()

FILTER()

Learning these combinations will help you solve many real-world Excel interview questions.

❤️ React with ❤️ for more Excel interview challenges!
  • ❤ 13
Post #2962 5.64K
🚀 𝗔𝗜 & 𝗠𝗮𝗰𝗵𝗶𝗻𝗲 𝗟𝗲𝗮𝗿𝗻𝗶𝗻𝗴 𝗙𝗥𝗘𝗘 𝗖𝗲𝗿𝘁𝗶𝗳𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝗖𝗼𝘂𝗿𝘀𝗲🔥

Learn the most in-demand AI skills from scratch and strengthen your profile with industry-recognized certificates! 🎓

✅ Beginner-Friendly Courses
✅ Learn Online at Your Own Pace
✅ 100% FREE of cost

Perfect for Students, Freshers & Working Professionals looking to build a career in AI/ML. 💼

𝗘𝗻𝗿𝗼𝗹𝗹 𝗙𝗼𝗿 𝗙𝗥𝗘𝗘👇:- 

https://pdlink.in/4phANS2

📢 Share this with your friends who want to start their AI career!
Post #2961 6.64K
𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝗲𝗿:

You have 2 minutes to solve this Power BI problem.

You have a Sales table with the following columns:

Product

Sales

Create a DAX measure to rank products based on total sales, with the highest-selling product ranked as 1.

𝗠𝗲: Challenge accepted! 💪

Product Rank =
RANKX(
ALL(Sales[Product]),
[Total Sales],
,
DESC,
DENSE
)


💡 Explanation:

• RANKX() assigns a rank to each product based on its total sales.

• ALL(Sales) removes the product filter so all products are included in the ranking.

• [Total Sales] is the expression used for ranking.

• DESC ranks the highest sales as Rank 1.

• DENSE ensures there are no gaps in ranking when products have the same sales.[Product]

This challenge tests your understanding of: ✅ RANKX()

✅ ALL()

✅ Ranking in DAX

✅ Filter Context

🎯 Expected Output Example

Product: Laptop | Sales: 75,000 | Rank: 1

Product: Mobile | Sales: 68,000 | Rank: 2

Product: Monitor | Sales: 52,000 | Rank: 3

Product: Keyboard | Sales: 52,000 | Rank: 3

Product: Mouse | Sales: 40,000 | Rank: 4

🚀 Bonus (Rank Within Selected Filters)

Product Rank =
RANKX(
ALLSELECTED(Sales[Product]),
[Total Sales],
,
DESC,
DENSE
)


Using ALLSELECTED() makes the ranking dynamic by considering the products visible after slicers and filters are applied.

🚀 Tip for Power BI Job Seekers:

RANKX() is one of the most frequently asked DAX functions. Be comfortable using it for:

• Top N Products

• Customer Ranking

• Employee Performance Ranking

• Regional Sales Ranking

• Dynamic Leaderboards

React with ❤️ for more Power BI interview challenges!
  • ❤ 12
Post #2960 5.62K
📈 𝗗𝗮𝘁𝗮 𝗔𝗻𝗮𝗹𝘆𝘁𝗶𝗰𝘀 𝗙𝗥𝗘𝗘 𝗖𝗲𝗿𝘁𝗶𝗳𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝗖𝗼𝘂𝗿𝘀𝗲😍

Data Analytics is one of the most in-demand skills in today’s job market 💻

✅ Beginner Friendly
✅ Industry-Relevant Curriculum
✅ Certification Included
✅ 100% Online

𝗘𝗻𝗿𝗼𝗹𝗹 𝗙𝗼𝗿 𝗙𝗥𝗘𝗘👇:- 

https://pdlink.in/4wh2ugB

🎯 Don’t miss this opportunity to build high-demand skills!
  • 👍 1
Post #2959 6.58K
🚀 Power BI Interview Challenge #4 🔥

𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝗲𝗿:
You have 2 minutes to solve this Power BI problem.

You have a Sales table with the following columns:
Product
Sales

Create a DAX measure to calculate the percentage contribution of each product to total sales.

𝗠𝗲: Challenge accepted! 💪

Sales Contribution % =
DIVIDE(
[Total Sales],
CALCULATE(
[Total Sales],
ALL(Sales[Product])
),
0
)

💡 Explanation:
This measure calculates how much each product contributes to the total sales.
• [Total Sales] returns the sales for the current product.
• ALL(Sales) removes the product filter while keeping other filters intact.
• CALCULATE() recalculates the total sales after removing the product filter.
• DIVIDE() safely performs the division and avoids divide-by-zero errors.

This challenge tests your understanding of:
✅ CALCULATE()
✅ ALL()
✅ DIVIDE()
✅ Filter Context
✅ Percentage Calculations

🎯 Expected Output Example
Product | Sales | Sales Contribution %
Laptop | 50,000 | 50%
Mouse | 20,000 | 20%
Keyboard | 15,000 | 15%
Monitor | 15,000 | 15%

🚀 Bonus (Dynamic Percentage by Selected Filters)

Sales Contribution % =
DIVIDE(
[Total Sales],
CALCULATE(
[Total Sales],
ALLSELECTED(Sales[Product])
),
0
)

Using ALLSELECTED() respects slicers and page filters while removing only the product filter, making the measure more interactive.

🚀 Tip for Power BI Job Seekers:
Understanding the difference between these functions is crucial for interviews:
• ALL() → Removes all filters from the specified column or table.
• ALLSELECTED() → Respects user selections made through slicers and filters.
• REMOVEFILTERS() → Modern alternative to remove filters in many scenarios.

These are among the most frequently asked DAX concepts in Power BI interviews.

Power BI Resources: https://whatsapp.com/channel/0029Vai1xKf1dAvuk6s1v22c

❤️ React with ❤️ for more Power BI interview challenges!
  • ❤ 14
Post #2957 6.13K
🚀 Power BI Interview Challenge #3 🔥

𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝗲𝗿:
You have 2 minutes to solve this Power BI problem.

You have a Sales table with the following columns:

• Order Date
• Sales

Create a DAX measure to calculate Year-over-Year (YoY) Sales Growth %.

𝗠𝗲: Challenge accepted! 💪

YoY Growth % =
VAR CurrentYearSales = [Total Sales]
VAR PreviousYearSales =
CALCULATE(
[Total Sales],
SAMEPERIODLASTYEAR('Calendar'[Date])
)
RETURN
DIVIDE(
CurrentYearSales - PreviousYearSales,
PreviousYearSales,
0
)


💡 Explanation:

This measure calculates the percentage growth in sales compared to the same period in the previous year.

• CurrentYearSales stores the current period's sales.
• SAMEPERIODLASTYEAR() retrieves sales for the same period last year.
• DIVIDE() safely calculates the percentage growth and avoids divide-by-zero errors.

This challenge tests your understanding of:
✅ Variables (VAR)
✅ CALCULATE()
✅ SAMEPERIODLASTYEAR()
✅ DIVIDE()
✅ Time Intelligence

🎯 Expected Output Example

For Year 2025: Sales = 120,000, Previous Year Sales = 100,000, YoY Growth % = 20%
For Year 2026: Sales = 150,000, Previous Year Sales = 120,000, YoY Growth % = 25%

🚀 Bonus (YoY Sales Difference)

YoY Sales Difference =
[Total Sales] -
CALCULATE(
[Total Sales],
SAMEPERIODLASTYEAR('Calendar'[Date])
)


This measure returns the absolute increase or decrease in sales compared to the previous year.

🚀 Tip for Power BI Job Seekers:

CALCULATE() is the most important DAX function. Learn how it modifies the filter context because it's used in almost every advanced Power BI interview question.

Power BI Resources: https://whatsapp.com/channel/0029Vai1xKf1dAvuk6s1v22c

❤️ React with ❤️ for more Power BI interview challenges!
  • ❤ 12
Post #2954 5.77K
🚀 Power BI Interview Challenge #2 🔥

𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝗲𝗿:
You have 2 minutes to solve this Power BI problem.

You have a Sales table with the columns: Order Date & Sales

Create a DAX measure to calculate Month-to-Date (MTD) Sales.

𝗠𝗲: Challenge accepted! 💪
MTD Sales =
TOTALMTD(
SUM(Sales[Sales]),
Sales[Order Date]
)

💡 Explanation:
• TOTALMTD() calculates cumulative sales from the beginning of the current month up to the selected date.
• SUM(Sales) returns the total sales amount.
• Sales[Order Date] is the date column used for the MTD calculation.
• The measure automatically resets at the beginning of each new month.

🎯 Expected Output Example
Date | Sales | MTD Sales
Jul 1 | 2,000 | 2,000
Jul 2 | 3,500 | 5,500
Jul 3 | 1,500 | 7,000
Jul 4 | 4,000 | 11,000

🚀 Bonus (Using a Calendar Table)
MTD Sales =
TOTALMTD(
[Total Sales],
'Calendar'[Date]
)

Using a dedicated Calendar table improves model performance and ensures accurate time intelligence calculations.

🚀 Tip for Power BI Job Seekers:
Always create a proper Date Table and mark it as a Date Table in Power BI before using Time Intelligence functions. Many interview questions are designed to test this best practice.

Power BI Resources: https://whatsapp.com/channel/0029Vai1xKf1dAvuk6s1v22c

❤️ React with ❤️ for more Power BI interview challenges!
  • ❤ 8
Post #2952 7.58K
🚀 Power BI Interview Challenge #1 🔥

𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝗲𝗿:
You have 2 minutes to solve this Power BI problem.

You have a Sales table with the following columns:
Order Date
Sales

Create a DAX measure to calculate Year-to-Date (YTD) Sales.

𝗠𝗲: Challenge accepted! 💪

YTD Sales =
TOTALYTD(
SUM(Sales[Sales]),
Sales[Order Date]
)

💡 Explanation:
TOTALYTD() calculates the cumulative sales from the beginning of the year up to the current date.
• SUM(Sales) returns the total sales amount
• Sales[Order Date] is the date column used for the YTD calculation
• The measure automatically resets at the start of each new year[Sales]

🎯 Expected Output Example
Month | Sales | YTD Sales
--- | --- | ---
Jan | 10,000 | 10,000
Feb | 15,000 | 25,000
Mar | 12,000 | 37,000
Apr | 18,000 | 55,000

🚀 Bonus (Using a Calendar Table)
YTD Sales =
TOTALYTD(
[Total Sales],
'Calendar'[Date]
)

Using a dedicated Calendar/Date table is considered a Power BI best practice and is recommended for all time intelligence calculations.

🚀 Tip for Power BI Job Seekers:
Time Intelligence is one of the most frequently tested topics in Power BI interviews. Make sure you can confidently write measures for:
• YTD (Year-to-Date)
• MTD (Month-to-Date)
• QTD (Quarter-to-Date)
• Previous Year Sales
• YoY Growth %
• Rolling 12 Months

These are commonly used in business dashboards and technical interviews.

Power BI Resources: https://whatsapp.com/channel/0029Vai1xKf1dAvuk6s1v22c

❤️ React with ❤️ for more Power BI interview challenges!
  • ❤ 16
Post #2950 6.49K
𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝗲𝗿: 
You have 2 minutes to solve this SQL query. 
Find the employee(s) who have worked on the highest number of distinct projects. 

Assume the table structure: employee_projects(employee_id, project_id)

𝗠𝗲: Challenge accepted! 💪

SELECT
    employee_id,
    total_projects
FROM (
    SELECT
        employee_id,
        COUNT(DISTINCT project_id) AS total_projects,
        DENSE_RANK() OVER (
            ORDER BY COUNT(DISTINCT project_id) DESC
        ) AS rnk
    FROM employee_projects
    GROUP BY employee_id
) ranked
WHERE rnk = 1;


💡 Explanation: 
This query counts the number of unique projects each employee has worked on and identifies those with the highest count.

• COUNT(DISTINCT project_id) counts unique projects for each employee
• GROUP BY employee_id creates one record per employee
• DENSE_RANK() ranks employees based on the number of projects
• The outer query returns all employees tied for the highest number of projects

This question tests your understanding of: 
✅ COUNT(DISTINCT) 
✅ GROUP BY 
✅ Window Functions DENSE_RANK 
✅ Ranking Aggregated Results 

🎯 Expected Output Example 
Employee ID | Total Projects 
101 | 12 
205 | 12 

Both employees have worked on the highest number of distinct projects.

🚀 Alternative Without Window Functions

SELECT
    employee_id,
    COUNT(DISTINCT project_id) AS total_projects
FROM employee_projects
GROUP BY employee_id
HAVING COUNT(DISTINCT project_id) = (
    SELECT MAX(project_count)
    FROM (
        SELECT
            COUNT(DISTINCT project_id) AS project_count
        FROM employee_projects
        GROUP BY employee_id
    ) t
);


This solution uses nested subqueries and MAX() instead of window functions.

🚀 Tip for SQL Job Seekers: 
Many interview questions involve ranking aggregated results, such as: 
Highest number of projects, Most orders, Maximum sales, Highest attendance, Most logins 

Practice combining GROUP BY with window functions like DENSE_RANK() to solve these efficiently.

❤️ React with ❤️ for more interview challenges!
  • ❤ 12
  • 👏 2
Post #2949 5.08K
🚀 𝗣𝗮𝘆 𝗔𝗳𝘁𝗲𝗿 𝗣𝗹𝗮𝗰𝗲𝗺𝗲𝗻𝘁 𝗣𝗿𝗼𝗴𝗿𝗮𝗺 - 𝗟𝗮𝘂𝗻𝗰𝗵 𝗬𝗼𝘂𝗿 𝗧𝗲𝗰𝗵 𝗖𝗮𝗿𝗲𝗲𝗿

If you’re serious about starting your career in tech, this is one opportunity you shouldn’t miss 🚀

✅ 2000+ Students Already Placed
🤝 500+ Hiring Partners
💼 Salary: ₹7.4 LPA
🚀 Highest Package: ₹41 LPA

💻 Get trained in in-demand tech skills
👨‍🏫 Learn from industry experts
📈 Get dedicated placement support
💸 Pay only after you land a job

𝐑𝐞𝐠𝐢𝐬𝐭𝐞𝐫 𝐍𝐨𝐰 👇:-

 https://pdlink.in/42WOE5H

Hurry! Limited seats are available.🏃‍♂️
Post #2948 5.3K
🎓 𝗧𝗼𝗽 𝗖𝗼𝗺𝗽𝗮𝗻𝗶𝗲𝘀 𝗢𝗳𝗳𝗲𝗿𝗶𝗻𝗴 𝗙𝗥𝗘𝗘 𝗖𝗲𝗿𝘁𝗶𝗳𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝗖𝗼𝘂𝗿𝘀𝗲𝘀 𝗶𝗻 𝟮𝟬𝟮𝟲

Boost your resume with Industry-recognized certifications without spending a single rupee 🌟

📚 Available from:
✅ Google
✅ Microsoft
✅ Cisco
✅ IBM
✅ HP
✅ Qualcomm
✅ TCS
✅ Infosys

🔗 𝗘𝗻𝗿𝗼𝗹𝗹 𝗙𝗼𝗿 𝗙𝗥𝗘𝗘👇:

https://pdlink.in/3SNiXKz

🚀 Don't miss these FREE certification opportunities in 2026!
  • ❤ 4
Post #2947 5.31K
🚀 Essential Tools Every Data Analyst Should Know

If you're starting your journey as a Data Analyst, focus on these essential tools first. These are the tools most commonly required in job descriptions and used in day-to-day work.

📊 1. Microsoft Excel

Used For:

Data Cleaning

Formulas & Functions

Pivot Tables

Dashboards

🗄️ 2. SQL

Used For:

Querying Databases

Data Extraction

Data Analysis

Reporting

📈 3. Power BI

Used For:

Interactive Dashboards

Data Visualization

Business Intelligence

KPI Reporting

📊 4. Tableau

Used For:

Data Visualization

Dashboard Creation

Business Reporting

🐍 5. Python

Used For:

Data Cleaning

Automation

Data Analysis

Data Visualization

🔄 6. Power Query

Used For:

Data Transformation

Data Cleaning

ETL Processes

🚀 Double Tap ❤️ For More
  • ❤ 26
Post #2946 4.95K
𝗠𝗮𝘀𝘁𝗲𝗿 𝗧𝗵𝗲𝘀𝗲 𝗛𝗶𝗴𝗵-𝗗𝗲𝗺𝗮𝗻𝗱 𝗦𝗸𝗶𝗹𝗹𝘀 𝘁𝗼 𝗟𝗮𝗻𝗱 𝗛𝗶𝗴𝗵-𝗣𝗮𝘆𝗶𝗻𝗴 𝗝𝗼𝗯𝘀 🔥

This guide highlights 3 powerful skills that are opening doors to high-paying roles across tech and business .🎓

Perfect For
👨‍🎓 Students
💼 Freshers
📈 Job seekers trying to improve employability
🚀 Anyone who wants to build a future-proof career with better salary potential

🔗 𝗘𝗻𝗿𝗼𝗹𝗹 𝗙𝗼𝗿 𝗙𝗥𝗘𝗘👇:

https://pdlink.in/4vXeGmm

🚀 Start learning today. Build in-demand skills. Position yourself for better opportunities and bigger career growth.
  • ❤ 4
  • 👏 1
Post #2945 5.21K
𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝗲𝗿: 
You have 2 minutes to solve this SQL query.

Q: Find the employee(s) who received the highest salary increment compared to their previous salary.

Assume the table structure: 
salary_history(employee_id, salary, effective_date)

𝗠𝗲: Challenge accepted! 💪

WITH salary_changes AS (
    SELECT
        employee_id,
        salary,
        effective_date,
        salary - LAG(salary) OVER (
            PARTITION BY employee_id
            ORDER BY effective_date
        ) AS salary_increment
    FROM salary_history
)
SELECT
    employee_id,
    salary_increment
FROM (
    SELECT
        employee_id,
        salary_increment,
        DENSE_RANK() OVER (
            ORDER BY salary_increment DESC
        ) AS rnk
    FROM salary_changes
    WHERE salary_increment IS NOT NULL
) ranked
WHERE rnk = 1;


💡 Explanation: 
This query calculates each employee's salary increment and then finds the highest increment across all employees.

• LAG(salary) retrieves the employee's previous salary
• The difference between the current and previous salary gives the increment
• DENSE_RANK() ranks increments from highest to lowest
• The outer query returns all employees tied for the highest salary increment

This question tests your understanding of: 
✅ LAG() Window Function 
✅ Common Table Expressions (CTEs) 
✅ DENSE_RANK() 
✅ Time-Series Data Analysis

🎯 Expected Output Example

Employee ID | Salary Increment 
101 | 20,000 
205 | 20,000 

Both employees received the largest salary increase.

🚀 Why Interviewers Ask This? 
This is a classic window function interview question. It evaluates your ability to compare a row with its previous row—a common requirement in payroll, finance, and audit systems.

🚀 Tip for SQL Job Seekers: 
Master these analytical window functions: 
LAG() / LEAD() / FIRST_VALUE() / LAST_VALUE() / NTILE() 

These functions are frequently tested in product-based companies and data-focused interviews because they simplify complex row-by-row comparisons.

❤️ React with ❤️ for more interview challenges!
  • ❤ 13
Post #2944 4.7K
𝗠𝗶𝗰𝗿𝗼𝘀𝗼𝗳𝘁 𝗙𝗥𝗘𝗘 𝗟𝗲𝗮𝗿𝗻𝗶𝗻𝗴 𝗥𝗲𝘀𝗼𝘂𝗿𝗰𝗲𝘀🎓

Offers a wide range of free learning resources through Microsoft Learn, helping students, freshers, and professionals build job-ready skills at their own pace.

✅ 100% FREE self-paced learning modules
✅ Official learning platform from Microsoft

🔗 𝗘𝗻𝗿𝗼𝗹𝗹 𝗙𝗼𝗿 𝗙𝗥𝗘𝗘👇:

https://pdlink.in/4paqRJS

Explore Microsoft’s free resources. Build in-demand skills and make your profile stronger.
Post #2943 4.5K
𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝗲𝗿:
You have 2 minutes to solve this SQL query.

Q: Find the customer(s) who placed orders in every month of the year 2025.

Assume the table structure:
orders(order_id, customer_id, order_date)

𝗠𝗲: Challenge accepted! 💪

SELECT
customer_id
FROM orders
WHERE YEAR(order_date) = 2025
GROUP BY customer_id
HAVING COUNT(DISTINCT MONTH(order_date)) = 12;


💡 Explanation:
This query identifies customers who placed at least one order in every month of 2025.

• WHERE YEAR(order_date) = 2025 filters orders from the year 2025
• GROUP BY customer_id groups all orders by customer
• COUNT(DISTINCT MONTH(order_date)) counts the unique months in which each customer placed an order
• HAVING ... = 12 ensures the customer has orders in all 12 months

This question tests your understanding of:
✅ Date Functions (YEAR, MONTH)
✅ GROUP BY
✅ HAVING
✅ COUNT(DISTINCT)

🎯 Expected Output Example

| Customer ID |
|-------------|
| 101 |
| 205 |

These customers placed at least one order in every month of 2025.

🚀 Alternative (Database-Agnostic SQL)

SELECT
customer_id
FROM orders
WHERE EXTRACT(YEAR FROM order_date) = 2025
GROUP BY customer_id
HAVING COUNT(DISTINCT EXTRACT(MONTH FROM order_date)) = 12;


This version works with databases like PostgreSQL and Oracle that support the EXTRACT() function.

🚀 Tip for SQL Job Seekers:
Whenever you see interview questions containing phrases like:
"Every month" / "Every quarter" / "Every year" / "Every category"

Think of COUNT(DISTINCT ...) combined with GROUP BY and HAVING. This is a very common SQL interview pattern.

❤️ React with ❤️ for more interview challenges!
  • ❤ 15
Post #2942 4.3K
𝗔𝗜 𝗶𝗻 𝗣𝗿𝗼𝗱𝘂𝗰𝘁 𝗠𝗮𝗻𝗮𝗴𝗲𝗺𝗲𝗻𝘁 𝗙𝗥𝗘𝗘 𝗢𝗻𝗹𝗶𝗻𝗲 𝗠𝗮𝘀𝘁𝗲𝗿𝗰𝗹𝗮𝘀𝘀 😍

💫 Join this live masterclass and gain practical insights into AI-powered Product Management, in-demand skills

💫Roadmap to building a successful Product Management career

Eligibility :- Recent Graduates & Working Professionals

𝗥𝗲𝗴𝗶𝘀𝘁𝗲𝗿 𝗙𝗼𝗿 𝗙𝗥𝗘𝗘👇 :-

https://pdlink.in/44VeqIA

( Limited Slots ..Hurry Up‍ )

Date & Time :- 11th July 2026 , 8:00 PM (IST)
  • ❤ 4
  • 👍 1
Post #2941 4.92K
Scenario based  Interview Questions & Answers for Data Analyst

1. Scenario: You are working on a SQL database that stores customer information. The database has a table called "Orders" that contains order details. Your task is to write a SQL query to retrieve the total number of orders placed by each customer.
  Question:
  - Write a SQL query to find the total number of orders placed by each customer.
Expected Answer:
    SELECT CustomerID, COUNT(*) AS TotalOrders
    FROM Orders
    GROUP BY CustomerID;

2. Scenario: You are working on a SQL database that stores employee information. The database has a table called "Employees" that contains employee details. Your task is to write a SQL query to retrieve the names of all employees who have been with the company for more than 5 years.
  Question:
  - Write a SQL query to find the names of employees who have been with the company for more than 5 years.
Expected Answer:
    SELECT Name
    FROM Employees
    WHERE DATEDIFF(year, HireDate, GETDATE()) > 5;

Power BI Scenario-Based Questions

1. Scenario: You have been given a dataset in Power BI that contains sales data for a company. Your task is to create a report that shows the total sales by product category and region.
    Expected Answer:
    - Load the dataset into Power BI.
    - Create relationships if necessary.
    - Use the "Fields" pane to select the necessary fields (Product Category, Region, Sales).
    - Drag these fields into the "Values" area of a new visualization (e.g., a table or bar chart).
    - Use the "Filters" pane to filter data as needed.
    - Format the visualization to enhance clarity and readability.

2. Scenario: You have been asked to create a Power BI dashboard that displays real-time stock prices for a set of companies. The stock prices are available through an API.
  Expected Answer:
    - Use Power BI Desktop to connect to the API.
    - Go to "Get Data" > "Web" and enter the API URL.
    - Configure the data refresh settings to ensure real-time updates (e.g., setting up a scheduled refresh or using DirectQuery if supported).
    - Create visualizations using the imported data.
    - Publish the report to the Power BI service and set up a data gateway if needed for continuous refresh.

3. Scenario: You have been given a Power BI report that contains multiple visualizations. The report is taking a long time to load and is impacting the performance of the application.
    Expected Answer:
    - Analyze the current performance using Performance Analyzer.
    - Optimize data model by reducing the number of columns and rows, and removing unnecessary calculations.
    - Use aggregated tables to pre-compute results.
    - Simplify DAX calculations.
    - Optimize visualizations by reducing the number of visuals per page and avoiding complex custom visuals.
    - Ensure proper indexing on the data source.

Free SQL Resources: https://whatsapp.com/channel/0029VanC5rODzgT6TiTGoa1v

Like if you need more similar content

Hope it helps :)
  • ❤ 12
Older posts →
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →