Data Analytics
110K subscribers
190 photos
2 files
905 links
Perfect channel to learn Data Analytics

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

For Promotions: @coderfun @love_data
Download Telegram
Interviewer: 
You have 2 minutes to solve this SQL query. 
Find the employee or employees who earn more than the average salary of their department and have been with the company for more than 5 years.

Assume the table structure: 
employees(employee_id, employee_name, department, salary, joining_date)

Me: Challenge accepted! 

SELECT
    employee_id,
    employee_name,
    department,
    salary,
    joining_date
FROM employees e
WHERE salary > (
    SELECT AVG(salary)
    FROM employees
    WHERE department = e.department
)
AND joining_date <= CURRENT_DATE - INTERVAL '5 years';


Explanation: 
This query applies two conditions to identify experienced, high-performing employees.

• The correlated subquery calculates the average salary for each employee's department.
• The first condition returns employees earning above their department's average salary.
• The second condition filters employees who joined the company more than 5 years ago.
• Only employees satisfying both conditions are included in the final result.

This question tests your understanding of: 
• Correlated Subqueries
• Aggregate Functions using AVG
• Date Arithmetic
• Multiple Filtering Conditions

Expected Output Example 
Employee: John, Department: IT, Salary: 95,000, Joining Date: 2018-01-10 

Employee: Sarah, Department: HR, Salary: 82,000, Joining Date: 2017-06-15 

Alternative Using Window Functions 

SELECT
    employee_id,
    employee_name,
    department,
    salary,
    joining_date
FROM (
    SELECT
        *,
        AVG(salary) OVER (PARTITION BY department) AS dept_avg_salary
    FROM employees
) e
WHERE salary > dept_avg_salary
AND joining_date <= CURRENT_DATE - INTERVAL '5 years';


This approach avoids a correlated subquery by calculating the departmental average once using a window function, which can be more efficient on large datasets.

Tip for SQL Job Seekers: 
Real-world interview questions often combine multiple SQL concepts in a single problem. Practice writing queries that use: 
• Window Functions
• Correlated Subqueries
• Date Functions
• Aggregate Functions
• Complex WHERE conditions

These combined-concept questions are common in mid-level and senior SQL interviews.

❤️ React with ❤️ for more SQL interview challenges!
10
𝗞𝗶𝗰𝗸𝘀𝘁𝗮𝗿𝘁 𝗬𝗼𝘂𝗿 𝗔𝗜 𝗝𝗼𝘂𝗿𝗻𝗲𝘆 | 𝟱 𝗠𝘂𝘀𝘁-𝗪𝗮𝘁𝗰𝗵 𝗙𝗥𝗘𝗘 𝗩𝗶𝗱𝗲𝗼𝘀 🚀

The good news is — you don’t need expensive courses to understand the basics of AI, Machine Learning, Neural Networks, Prompting, and real-world AI tools.

This guide features 5 must-watch FREE AI videos that can help you build a strong foundation in AI concepts

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

https://pdlink.in/4gn4LS5

🚀 Start watching today. Learn AI step by step. Build future-ready skills for free.
4
Interviewer: 
You have 2 minutes to solve this SQL query. 

Find the employee(s) with the highest salary in each department without using window functions.

Assume the table structure: 
employees(employee_id, employee_name, department, salary)

Me: Challenge accepted! 💪 
SELECT 
    employee_id, 
    employee_name, 
    department, 
    salary 
FROM employees e1 
WHERE salary = ( 
    SELECT MAX(salary) 
    FROM employees e2 
    WHERE e2.department = e1.department 
);

💡 Explanation: 
This query uses a correlated subquery instead of a window function.

• The outer query processes each employee
• The correlated subquery finds the maximum salary within that employee's department
• If the employee's salary matches the maximum salary, the employee is returned
• If multiple employees share the highest salary in a department, they are all included

This question tests your understanding of: 
• Correlated Subqueries
• Aggregate Functions (MAX)
• Filtering with Subqueries
• Handling Ties

🎯 Expected Output Example: 
John     | IT      | 95,000 
Alice    | IT      | 95,000 
Sarah    | HR      | 82,000 
David    | Finance | 91,000 

John and Alice are both returned because they share the highest salary in the IT department.

🚀 Alternative Using a Self Join 
SELECT 
    e1.employee_id, 
    e1.employee_name, 
    e1.department, 
    e1.salary 
FROM employees e1 
LEFT JOIN employees e2 
    ON e1.department = e2.department 
   AND e1.salary < e2.salary 
WHERE e2.employee_id IS NULL; 

This solution works by eliminating employees who have someone in the same department with a higher salary. The remaining employees are the highest-paid in their respective departments.

🚀 Tip for SQL Job Seekers: 
Interviewers often restrict certain SQL features like window functions or CTEs to evaluate your understanding of alternative approaches. Be prepared to solve the same problem using: 
• Correlated Subqueries
• Self Joins
• CTEs
• Window Functions

Knowing multiple solutions demonstrates strong SQL fundamentals.

❤️ React with ❤️ for more SQL interview challenges!
5🎉4
🎓 𝗧𝗼𝗽 𝟱 𝗙𝗥𝗘𝗘 𝗖𝗼𝘂𝗿𝘀𝗲𝘀 𝗧𝗼 𝗜𝗺𝗽𝗿𝗼𝘃𝗲 𝗬𝗼𝘂𝗿 𝗦𝗸𝗶𝗹𝗹𝘀𝗲𝘁 🚀

These 5 FREE courses that can help you stand out in interviews and job applications! 💼

📊 Microsoft Excel
📈 Power BI
💫 Python for Data Science
Time Management
💰 Basic Financial Accounting

🎯 Invest a few hours today to unlock better career opportunities tomorrow!

🔗 𝗟𝗲𝗮𝗿𝗻 𝗙𝗼𝗿 𝗙𝗥𝗘𝗘 👇:-

https://pdlink.in/4dPjz92

📌 Save this post and share it with friends looking to upskill in 2026.
5👍1
𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝗲𝗿:
You have 2 minutes to solve this SQL query.

Find the second most recent order placed by each customer.

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

𝗠𝗲: Challenge accepted! 💪

SELECT
order_id,
customer_id,
order_date
FROM (
SELECT
order_id,
customer_id,
order_date,
ROW_NUMBER() OVER (
PARTITION BY customer_id
ORDER BY order_date DESC
) AS rn
FROM orders
) ranked
WHERE rn = 2;

💡 Explanation:

The query assigns a rank to each order based on its order date for every customer.

PARTITION BY customer_id creates a separate ranking for each customer
ORDER BY order_date DESC ranks the most recent order as 1
ROW_NUMBER() ensures each order gets a unique rank
• The outer query returns only the order with rn = 2, i.e., the second most recent order

This question tests your understanding of:
Window Functions (ROW_NUMBER)
Ranking Records
Partitioning Data
Top N per Group

🎯 Expected Output Example
Customer ID | Order ID | Order Date
101 | 2056 | 2026-06-15
102 | 2074 | 2026-06-18

Customers with fewer than two orders are automatically excluded.

🚀 Alternative Using a Correlated Subquery
SELECT
o1.order_id,
o1.customer_id,
o1.order_date
FROM orders o1
WHERE 1 = (
SELECT COUNT(*)
FROM orders o2
WHERE o2.customer_id = o1.customer_id
AND o2.order_date > o1.order_date
);

This approach counts how many orders are more recent than the current order. If exactly one order is more recent, the current order is the second most recent.

🚀 Tip for SQL Job Seekers:
Questions involving the Nth latest or Nth earliest record appear frequently in interviews. Practice solving them using:
• ROW_NUMBER()
• RANK()
• DENSE_RANK()
• Correlated Subqueries

Understanding when to use each approach is a valuable interview skill.

❤️ React with ❤️ for more interview challenges!
4👍3
📊 𝗗𝗮𝘁𝗮 𝗔𝗻𝗮𝗹𝘆𝘁𝗶𝗰𝘀 𝗙𝗥𝗘𝗘 𝗖𝗲𝗿𝘁𝗶𝗳𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝗖𝗼𝘂𝗿𝘀𝗲𝘀 🚀

100% FREE learning opportunities
Great for students, freshers, and beginners
Help you build a stronger resume with recognized names like Cisco, Google, and Microsoft
Useful for analytics internships, off-campus drives, and fresher hiring

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

https://pdlink.in/4eRA6eF

🚀 Start learning today. Build your analytics foundation. Earn free certifications. Move one step closer to your Data Analyst career.
3
If you are interested to learn SQL for data analytics purpose and clear the interviews, just cover the following topics

1)Install MYSQL workbench
2) Select
3) From
4) where
5) group by
6) having
7) limit
8) Joins (Left, right , inner, self, cross)
9) Aggregate function ( Sum, Max, Min , Avg)
9) windows function ( row num, rank, dense rank, lead, lag, Sum () over)
10)Case
11) Like
12) Sub queries
13) CTE
14) Replace CTE with temp tables
15) Methods to optimize Sql queries
16) Solve problems and case studies at Ankit Bansal youtube channel

Trick: Just copy each term and paste on youtube and watch any 10 to 15 minute on each topic and practise it while learning , By doing this , you get the basics understanding

17) Now time to go on youtube and search data analysis end to end project using sql

18) Watch them and practise them end to end.

17) learn integration with power bi

In this way , you will not only memorize the concepts but also learn how to implement them in your current working and projects and will be able to defend it in your interviews as well.
12👍4
𝗙𝗥𝗘𝗘 𝗩𝗶𝗿𝘁𝘂𝗮𝗹 𝗖𝗲𝗿𝘁𝗶𝗳𝗶𝗰𝗮𝘁𝗲 𝗜𝗻𝘁𝗲𝗿𝗻𝘀𝗵𝗶𝗽𝘀 | 𝗕𝗼𝗼𝘀𝘁 𝗬𝗼𝘂𝗿 𝗥𝗲𝘀𝘂𝗺𝗲🎓

These FREE virtual certificate internships can help you build practical skills, industry exposure, and resume value from top companies and global platforms — all from home.

💫Perfect for students, freshers, and career starters

- PwC Power BI Virtual Internship
- British Airways Data Science Virtual Internship
- Quantium Data Analytics Virtual Internship

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

https://pdlink.in/44PEjcL

🚀 Start learning today. Build experience. Collect certificates. Make your resume stronger.
2
𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝗲𝗿:
You have 2 minutes to solve this SQL query.

Find employees whose salary is higher than the average salary of all other departments (excluding their own department).

Assume the table structure:
employees(employee_id, employee_name, department, salary)

𝗠𝗲: Challenge accepted! 💪

SELECT
employee_id,
employee_name,
department,
salary
FROM employees e1
WHERE salary > (
SELECT AVG(salary)
FROM employees e2
WHERE e2.department <> e1.department
);

💡 Explanation:
This query compares each employee's salary against the average salary of all employees outside their own department.

• The outer query processes each employee.
• The correlated subquery calculates the average salary of employees in all other departments.
• Employees whose salary exceeds that average are returned.

This question tests your understanding of:
Correlated Subqueries
Aggregate Functions (AVG)
Conditional Filtering
Cross-group Comparisons

🎯 Expected Output Example
Employee: John | Department: IT | Salary: 95,000
Employee: Sarah | Department: HR | Salary: 82,000


🚀 Alternative Using Common Table Expressions (CTEs)
WITH dept_avg AS (
SELECT
department,
AVG(salary) AS avg_salary
FROM employees
GROUP BY department
)
SELECT
e.employee_id,
e.employee_name,
e.department,
e.salary
FROM employees e
WHERE e.salary > (
SELECT AVG(avg_salary)
FROM dept_avg d
WHERE d.department <> e.department
);

This version first computes department-level averages and then compares each employee's salary with the average of the other departments' averages.

🚀 Tip for SQL Job Seekers:
Interviewers often ask questions that compare data within a group versus outside a group. These problems test your understanding of correlated subqueries and aggregate calculations across multiple levels.

❤️ React with ❤️ for more SQL interview challenges!
110
GigaChat 3.5 Ultra Publicly Released — The New Generation of the Flagship Model

The GigaChat team has released GigaChat 3.5 Ultra as open source—a new 432B model under the MIT license. This is the first open-source hybrid of GatedDeltaNet and MLA scaled to hundreds of billions of parameters, featuring a proprietary training recipe we refined through more than 1,500 experiments. The model has grown in terms of code, mathematics, agent scenarios, and application domains—yet it’s 40% smaller than GigaChat 3.1 Ultra.


What’s inside:

🔘A proprietary hybrid MLA + Gated DeltaNet architecture with a dedicated stabilization framework, without which this hybrid setup would not train reliably at this scale;
🔘 Gated Attention: the model can locally down-weight overly strong signals from the attention layer;
🔘GatedNorm: normalization with an explicit gate that controls signal magnitude across features;
🔘Approximately 4x lower KV cache per token: with the same memory budget, the model can support 2.14x longer context and deliver a 20% throughput increase under load;
🔘Two MTP heads, enabling up to 2.2x faster generation;
🔘FP8 across all training stages with no quality degradation compared with bf16, enabled by custom Triton and CUDA kernels;
🔘A new online RL stage after SFT and DPO.

Results:

🔘 GigaChat-3.5-Ultra-Base outperforms DeepSeek V3.2 Exp Base and DeepSeek V4 Flash Base on average across a set of general, math, and code benchmarks:
🔘 GigaChat-3.5-Ultra-Instruct is comparable to DeepSeek V3.2 in terms of average score, despite having half the size;
🔘 According to the MiniMax-M2.7 LLM judge, the average win rate against GigaChat 3.1 Ultra is 75.9%, and against GPT-5 is 68.7%.

The entire stack — data (our own LLM-filtered Common Crawl, 600+ programming languages in the code), architecture, training methodology, and infrastructure — was built end-to-end by GigaChat team.

➡️ HuggingFace
Please open Telegram to view this post
VIEW IN TELEGRAM
4👏1
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 :)
9
𝗔𝗜 𝗶𝗻 𝗣𝗿𝗼𝗱𝘂𝗰𝘁 𝗠𝗮𝗻𝗮𝗴𝗲𝗺𝗲𝗻𝘁 𝗙𝗥𝗘𝗘 𝗢𝗻𝗹𝗶𝗻𝗲 𝗠𝗮𝘀𝘁𝗲𝗿𝗰𝗹𝗮𝘀𝘀 😍

💫 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)
3👍1
𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝗲𝗿:
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
𝗠𝗶𝗰𝗿𝗼𝘀𝗼𝗳𝘁 𝗙𝗥𝗘𝗘 𝗟𝗲𝗮𝗿𝗻𝗶𝗻𝗴 𝗥𝗲𝘀𝗼𝘂𝗿𝗰𝗲𝘀🎓

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.
𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝗲𝗿: 
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
𝗠𝗮𝘀𝘁𝗲𝗿 𝗧𝗵𝗲𝘀𝗲 𝗛𝗶𝗴𝗵-𝗗𝗲𝗺𝗮𝗻𝗱 𝗦𝗸𝗶𝗹𝗹𝘀 𝘁𝗼 𝗟𝗮𝗻𝗱 𝗛𝗶𝗴𝗵-𝗣𝗮𝘆𝗶𝗻𝗴 𝗝𝗼𝗯𝘀 🔥

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
🚀 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
23
🎓 𝗧𝗼𝗽 𝗖𝗼𝗺𝗽𝗮𝗻𝗶𝗲𝘀 𝗢𝗳𝗳𝗲𝗿𝗶𝗻𝗴 𝗙𝗥𝗘𝗘 𝗖𝗲𝗿𝘁𝗶𝗳𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝗖𝗼𝘂𝗿𝘀𝗲𝘀 𝗶𝗻 𝟮𝟬𝟮𝟲

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
🚀 𝗣𝗮𝘆 𝗔𝗳𝘁𝗲𝗿 𝗣𝗹𝗮𝗰𝗲𝗺𝗲𝗻𝘁 𝗣𝗿𝗼𝗴𝗿𝗮𝗺 - 𝗟𝗮𝘂𝗻𝗰𝗵 𝗬𝗼𝘂𝗿 𝗧𝗲𝗰𝗵 𝗖𝗮𝗿𝗲𝗲𝗿

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.🏃‍♂️
𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝗲𝗿: 
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
🚀 𝗧𝗼𝗽 𝟱 𝗦𝗸𝗶𝗹𝗹𝘀 𝗧𝗼 𝗠𝗮𝘀𝘁𝗲𝗿 𝗜𝗻 𝟮𝟬𝟮𝟲 – 𝗘𝗻𝗿𝗼𝗹𝗹 𝗙𝗼𝗿 𝗙𝗥𝗘𝗘! 🎓

Want to build a high-paying, future-ready career? 🔥 Start learning the most in-demand skills:

💫 AI & ML :- https://pdlink.in/4phANS2

📊 Data Analytics :- https://pdlink.in/4wh2ugB

🔐 Cyber Security :- https://pdlink.in/4wCW7DJ

☁️ Cloud Computing :- https://pdlink.in/4yhBuie

💻 Other Tech Skills :- https://pdlink.in/4peUslB

📢 Share with your friends & college groups! 🚀🔥
4