
- Main
- Catalog
- Computer science
- Advertising on the Telegram channel «Data Analytics - SQL, Python, Excel, AI & ChatGPT»
Advertising on the Telegram channel «Data Analytics - SQL, Python, Excel, AI & ChatGPT»
Global English-speaking audience in this telegram channel who are interested in learning about new things and data oriented stuff.
Channel statistics
SELECT MAX(salary) AS second_highest_salary
FROM employees
WHERE salary < (SELECT MAX(salary) FROM employees);
{}
⭐ Using Window Function
SELECT salary
FROM (
SELECT salary, DENSE_RANK() OVER (ORDER BY salary DESC) AS rnk
FROM employees
) t
WHERE rnk = 2;
{}
✅ 17. Explain INNER JOIN vs LEFT JOIN vs FULL JOIN with examples for employees and departments.
⭐ INNER JOIN → Only matching records
SELECT e.name, d.department_name
FROM employees e
INNER JOIN departments d ON e.department_id = d.id;
{}
⭐ LEFT JOIN → All employees + matching departments
SELECT e.name, d.department_name
FROM employees e
LEFT JOIN departments d ON e.department_id = d.id;
{}
⭐ FULL JOIN → All records from both tables
SELECT e.name, d.department_name
FROM employees e
FULL JOIN departments d ON e.department_id = d.id;
{}
✅ 18. Find and remove duplicate records using CTE + ROW_NUMBER().
⭐ Find Duplicates
WITH cte AS (
SELECT *, ROW_NUMBER() OVER(PARTITION BY email ORDER BY id) rn
FROM employees
)
SELECT * FROM cte WHERE rn > 1;
{}
⭐ Remove Duplicates
WITH cte AS (
SELECT *, ROW_NUMBER() OVER(PARTITION BY email ORDER BY id) rn
FROM employees
)
DELETE FROM cte WHERE rn > 1;
{}
✅ 19. Explain WHERE vs HAVING with GROUP BY. Show department-wise avg salary > 50k.
👉 Difference
WHERE → filter before grouping
HAVING → filter after grouping
SELECT department_id, AVG(salary) AS avg_salary
FROM employees
GROUP BY department_id
HAVING AVG(salary) > 50000;
{}
✅ 20. Explain RANK vs DENSE_RANK vs ROW_NUMBER partitioned by department ordered by salary.
SELECT name, department_id, salary,
ROW_NUMBER() OVER(PARTITION BY department_id ORDER BY salary DESC) rn,
RANK() OVER(PARTITION BY department_id ORDER BY salary DESC) rnk,
DENSE_RANK() OVER(PARTITION BY department_id ORDER BY salary DESC) drnk
FROM employees;
{}
✅ 21. Find top 5 products by total sales using GROUP BY + LIMIT.
SELECT product_id, SUM(sales_amount) AS total_sales
FROM sales
GROUP BY product_id
ORDER BY total_sales DESC
LIMIT 5;
{}
✅ 22. Write a self join to show employee name and manager name.
SELECT e.name AS employee, m.name AS manager
FROM employees e
LEFT JOIN employees m ON e.manager_id = m.employee_id;
{}
✅ 23. Handle NULL salaries using COALESCE, IS NULL, IFNULL.
⭐ Using COALESCE
SELECT name, COALESCE(salary, 0) AS salary
FROM employees;
{}
⭐ Using IS NULL
SELECT * FROM employees WHERE salary IS NULL;
{}
✅ 24. Pivot sales data by month using CASE statement.
SELECT
SUM(CASE WHEN month = 'Jan' THEN sales ELSE 0 END) AS Jan,
SUM(CASE WHEN month = 'Feb' THEN sales ELSE 0 END) AS Feb,
SUM(CASE WHEN month = 'Mar' THEN sales ELSE 0 END) AS Mar
FROM sales;
{}
✅ 25. Subquery vs JOIN — which is faster? Why?
JOIN is usually faster, subquery is easier to read.
✅ 26. Write a recursive CTE for company hierarchy (CEO → managers → employees).
WITH RECURSIVE emp_hierarchy AS (
SELECT employee_id, name, manager_id
FROM employees
WHERE manager_id IS NULL
UNION ALL
SELECT e.employee_id, e.name, e.manager_id
FROM employees e
JOIN emp_hierarchy h ON e.manager_id = h.employee_id
)
SELECT * FROM emp_hierarchy;
{}
✅ 27. Explain clustered vs non-clustered indexes. When to use each?
⭐ Clustered Index: physically sorts table data
⭐ Non-Clustered Index: separate structure pointing to data
SQL Resources: https://whatsapp.com/channel/0029VanC5rODzgT6TiTGoa1v
Double Tap ♥️ For More=TRIM(A1)
- CLEAN() → removes non-printable characters =CLEAN(A1)
- Remove Duplicates → Data → Remove Duplicates
- Text to Columns → split data
- Find & Replace (Ctrl+H) → fix values
- Filter → remove blanks or errors
2️⃣ Absolute vs Relative References
Relative (A1) → changes when copied
Absolute ($A$1) → stays fixed
When to use:
- Relative → normal calculations
- Absolute → fixed values (tax rate, constants)
3️⃣ Create PivotTable for Sales Analysis
Steps:
1. Select data
2. Insert → PivotTable
3. Drag: Region → Rows, Product → Columns, Sales → Values
Used for fast data summarization.
4️⃣ VLOOKUP Formula + #N/A Fix
Formula: =VLOOKUP(A2, Sheet2!A:B, 2, FALSE)
Fix #N/A:
- Check lookup value exists
- Match data types
Use: =IFERROR(VLOOKUP(A2, A:B, 2, FALSE),"Not Found")
5️⃣ INDEX-MATCH vs VLOOKUP
VLOOKUP: =VLOOKUP(A2,A:B,2,FALSE)
INDEX-MATCH: =INDEX(B:B, MATCH(A2,A:A,0))
✅ Why INDEX-MATCH?
- Faster for large data
- Works left lookup
- More flexible
6️⃣ COUNTIF vs SUMIF vs COUNTIFS
COUNTIF → count condition =COUNTIF(A:A,"East")
SUMIF → sum condition =SUMIF(A:A,"East",B:B)
COUNTIFS → multiple conditions =COUNTIFS(A:A,"East",B:B,">500")
7️⃣ Goal Seek
Used for what-if analysis.
Steps:
1. Data → What-if Analysis → Goal Seek
2. Set cell → target value
3. Change variable cell
Example: target revenue calculation.
8️⃣ Conditional Formatting Top 10%
Steps: Select data
Home → Conditional Formatting
Top/Bottom Rules → Top 10%
9️⃣ Dynamic Dashboard + Slicers
Create PivotTable
Insert → Slicer
Insert → Timeline (for dates)
Connect slicers to multiple visuals
Used for interactive dashboards.
🔟 SUMPRODUCT (Multi-condition sum)
=SUMPRODUCT((A2:A10="East")(B2:B10>500)C2:C10)
Used for weighted or multiple-condition calculations.
1️⃣1️⃣ What is Power Query?
Excel’s ETL tool.
Steps:
- Get Data → Load data
- Remove columns
- Change types
- Remove duplicates
- Load cleaned data
Used for automation and transformation.
1️⃣2️⃣ Freeze Panes vs Split Panes
Freeze Panes → lock rows/columns while scrolling
Split Panes → divide screen into sections
1️⃣3️⃣ XLOOKUP vs VLOOKUP
XLOOKUP: =XLOOKUP(A2,A:A,B:B)
✅ Advantages:
- Left lookup
- No column index
- Default exact match
- Handles errors
1️⃣4️⃣ Circular References Fix
Occurs when formula refers to itself.
Fix:
Formulas → Error Checking → Circular References
Correct formula logic
1️⃣5️⃣ Data Validation + Named Range
Steps:
1. Formulas → Define Name
2. Data → Data Validation → List
3. Select named range
Used for dropdown lists.
Excel Resources: https://whatsapp.com/channel/0029VaifY548qIzv0u1AHz3i
Double Tap ♥️ For More
SELECT DISTINCT column_name
FROM employees;
{}
👉 Returns unique records but does not delete duplicates.
✅ 2️⃣ Using GROUP BY (to identify duplicates)
SELECT name, COUNT(*)
FROM employees
GROUP BY name
HAVING COUNT(*) > 1;
{}
👉 Helps find duplicate records.
✅ 3️⃣ Delete Duplicates Using ROW_NUMBER() (Most Important ⭐)
(Keeps one record and deletes others)
DELETE FROM employees
WHERE id IN (
SELECT id FROM (
SELECT id,
ROW_NUMBER() OVER (
PARTITION BY name, salary
ORDER BY id
) AS rn
FROM employees
) t
WHERE rn > 1
);
{}
🧠 Logic Breakdown:
- DISTINCT → shows unique records
- GROUP BY → identifies duplicates
- ROW_NUMBER() → removes duplicates safely
✅ Use Case: Data cleaning, ETL processes, data quality checks.
💡 Tip: Always take a backup before deleting duplicate records.
💬 Tap ❤️ for more!Reviews channel
7 total reviews
- Added: Newest first
- Added: Oldest first
- Rating: High to low
- Rating: Low to high
Catalog of Telegram Channels for Native Placements
Advertising on the Telegram channel «Data Analytics - SQL, Python, Excel, AI & ChatGPT» is a Telegram channel in the category «Интернет технологии», offering effective formats for placing advertising posts on TG. The channel has 110K subscribers and provides quality content. The advertising posts on the channel help brands attract audience attention and increase reach. The channel's rating is 12.7, with 7 reviews and an average score of 5.0.
You can launch an advertising campaign through the Telega.in service, choosing a convenient format for placement. The Platform provides transparent cooperation conditions and offers detailed analytics. The placement cost is 76.8 ₽, and with 43 completed requests, the channel has established itself as a reliable partner for advertising on Telegram. Place integrations today and attract new clients!
You will be able to add channels from the catalog to the cart again.
Комментарий