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
๐Ÿ“Š ๐—•๐—ฒ๐˜€๐˜ ๐—ฌ๐—ผ๐˜‚๐—ง๐˜‚๐—ฏ๐—ฒ ๐—–๐—ต๐—ฎ๐—ป๐—ป๐—ฒ๐—น๐˜€ ๐˜๐—ผ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป ๐——๐—ฎ๐˜๐—ฎ ๐—”๐—ป๐—ฎ๐—น๐˜†๐˜๐—ถ๐—ฐ๐˜€ ๐Ÿš€

You donโ€™t need expensive courses to learn SQL, Excel, Python, Power BI, Tableau, and real-world analytics projects.

The Best YouTube channels for Data Analytics can help you build job-ready skills for internships, placements, and full-time analyst roles โ€” all for FREE.

๐Ÿ”— ๐—˜๐—ป๐—ฟ๐—ผ๐—น๐—น ๐—™๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜๐Ÿ‘‡:

https://pdlink.in/3QO3MQB

๐Ÿš€Start with one channel, stay consistent, build projects, and your Data Analytics career can genuinely take off.
โค3
๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฒ๐˜„๐—ฒ๐—ฟ: 
You have 2 minutes to solve this SQL query.

Find the product(s) that have never been ordered.

Tables: 
products(product_id, product_name) 
order_details(order_id, product_id, quantity)

๐— ๐—ฒ: Challenge accepted! ๐Ÿ’ช 
SELECT 
    p.product_id, 
    p.product_name 
FROM products p 
LEFT JOIN order_details od 
    ON p.product_id = od.product_id 
WHERE od.product_id IS NULL;

๐Ÿ’ก Explanation: 
This query finds all products that do not have a matching record in the order_details table.

LEFT JOIN returns all products, regardless of whether they've been ordered. Products without matching orders will have NULL values for columns from order_details. WHERE od.product_id IS NULL filters only those products that have never been ordered.

This question tests your understanding of: LEFT JOIN, NULL handling, Finding unmatched records

๐ŸŽฏ Expected Output Example 
Product ID   Product Name 
104   Wireless Mouse 
118   USB Hub 
125   Laptop Stand 

๐Ÿš€ Alternative Using NOT EXISTS 
SELECT 
    p.product_id, 
    p.product_name 
FROM products p 
WHERE NOT EXISTS ( 
    SELECT 1 
    FROM order_details od 
    WHERE od.product_id = p.product_id 
);

NOT EXISTS is often preferred because it handles NULL values correctly and can perform better than other approaches in many database systems.

๐Ÿš€ Tip for SQL Job Seekers: 
Whenever you're asked to find records that don't exist in another table, consider these approaches: 

LEFT JOIN ... IS NULL, NOT EXISTS โœ… (often the best choice), NOT IN (be cautious with NULL values)

Knowing the pros and cons of each approach is a common interview discussion point.

โค๏ธ React with โค๏ธ for more SQL interview challenges!
โค7
๐Ÿš€ ๐—™๐—ฅ๐—˜๐—˜ ๐—ง๐—–๐—ฆ ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป | ๐—•๐—ผ๐—ผ๐˜€๐˜ ๐—ฌ๐—ผ๐˜‚๐—ฟ ๐—–๐—ฎ๐—ฟ๐—ฒ๐—ฒ๐—ฟ๐ŸŽ“

A FREE TCS certification can be a smart way to strengthen your profile, improve job readiness, and stand out in internships, placements, and fresher hiring.

โœ… Learn from one of Indiaโ€™s top IT companies
โœ… Add a recognized certification to your resume + LinkedIn profile
โœ… Great for students, freshers, and placement preparation
โœ… Free certifications from trusted brands add real value to your profile

๐Ÿ”— ๐—˜๐—ป๐—ฟ๐—ผ๐—น๐—น ๐—™๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜๐Ÿ‘‡:

https://pdlink.in/4fjeMPe

๐ŸŽ“Earn your free TCS certification. Make your resume stronger.
Interviewer:

You have 2 minutes to solve this SQL query. 

Find the employee or employees with the highest salary in the company without using MAX().

Me: Challenge accepted!

SELECT
    employee_id,
    employee_name,
    salary
FROM (
    SELECT
        employee_id,
        employee_name,
        salary,
        DENSE_RANK() OVER (ORDER BY salary DESC) AS salary_rank
    FROM employees
) ranked
WHERE salary_rank = 1;


Explanation:

This query finds the highest-paid employee or employees without using the MAX() aggregate function.

โ€ข DENSE_RANK() ranks salaries in descending order.

โ€ข The highest salary receives a rank of 1.

โ€ข The outer query filters only employees with salary_rank = 1.

โ€ข If multiple employees share the highest salary, they are all returned.

This question tests your understanding of:

โ€ข Window Functions using DENSE_RANK

โ€ข Ranking Data

โ€ข Handling Ties

โ€ข Alternatives to Aggregate Functions

Expected Output Example

Employee: John, Salary: 120,000

Employee: Alice, Salary: 120,000 

Both employees are returned because they share the highest salary.

Alternative Solution using NOT EXISTS

SELECT
    employee_id,
    employee_name,
    salary
FROM employees e1
WHERE NOT EXISTS (
    SELECT 1
    FROM employees e2
    WHERE e2.salary > e1.salary
);


This solution works by returning employees for whom no other employee has a higher salary.

Tip for SQL Job Seekers:

Interviewers often ask you to solve problems without using aggregate functions like MAX() or MIN(). Learn multiple approaches using: 

โ€ข Window Functions 

โ€ข NOT EXISTS 

โ€ข Correlated Subqueries 

โ€ข Self Joins 

Demonstrating alternative solutions shows strong SQL problem-solving skills.

โค๏ธ React with โค๏ธ for more SQL interview challenges!
โค11
๐—™๐—ฅ๐—˜๐—˜ ๐—ฃ๐˜†๐˜๐—ต๐—ผ๐—ป ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ด ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ | ๐Ÿฐ ๐— ๐˜‚๐˜€๐˜-๐—ง๐—ฎ๐—ธ๐—ฒ ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ ๐Ÿš€

โœ… Python is one of the most beginner-friendly and in-demand programming languages

๐ŸŽ“Perfect For
๐Ÿ‘จโ€๐ŸŽ“ Students
๐Ÿ’ผ Freshers
๐Ÿ’ซCoding Beginners
๐Ÿ“Š Data / AI / Automation aspirants
๐Ÿš€ Anyone planning to start a tech career with Python

๐Ÿ”— ๐—˜๐—ป๐—ฟ๐—ผ๐—น๐—น ๐—™๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜๐Ÿ‘‡:

https://pdlink.in/4wjwEz2

๐Ÿš€ Build Python skills for free. Take your first step toward a stronger tech career.
โค2
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!
1โค10
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