SQL Programming Resources
Find top SQL resources from global universities, cool projects, and learning materials for data analytics. Admin: @coderfun Useful links: heylink.me/DataAnalytics Promotions: @love_data
Больше📈 Аналитический обзор Telegram-канала SQL Programming Resources
Канал SQL Programming Resources (@sqlanalyst) языкового сегмента Английский является активным участником. Сейчас сообщество объединяет 76 536 подписчиков, занимая 1 677 место в категории Технологии и приложения и 4 007 место в регионе Индия.
📊 Показатели аудитории и динамика
С момента создания невідомо проект демонстрирует стремительный рост, собрав аудиторию из 76 536 подписчиков.
Согласно последним данным от 25 октября, 2026, канал показывает стабильную активность. За последние 30 дней изменение числа участников составило -171, а за последние 24 часа — -10, при этом общий охват остаётся высоким.
- Статус верификации: Не верифицирован
- Уровень вовлечённости (ER): Средний показатель вовлечённости аудитории составляет 2.69%. В первые 24 часа после публикации контент обычно набирает 1.02% реакций от общего числа подписчиков.
- Охват публикаций: В среднем каждый пост получает 2 062 просмотров. В течение первых суток публикация набирает 779 просмотров.
- Реакции и взаимодействия: Аудитория активно поддерживает контент: среднее количество реакций на один пост — 5.
- Тематические интересы: Контент сосредоточен на ключевых темах, таких как row, sql, customer_id, logic, desc.
📝 Описание и контентная политика
Автор описывает ресурс как площадку для выражения субъективного мнения:
“Find top SQL resources from global universities, cool projects, and learning materials for data analytics.
Admin: @coderfun
Useful links: heylink.me/DataAnalytics
Promotions: @love_data”
Благодаря высокой частоте обновлений (последние данные получены 26 октября, 2026) канал поддерживает актуальность и высокий уровень охвата публикаций. Аналитика показывает, что аудитория активно взаимодействует с контентом, что делает его важной точкой влияния в категории Технологии и приложения.
employee_id | employee_name | department | salary
------------|---------------|------------|-------
1 | Amit | IT | 50000
2 | Rahul | IT | 80000
3 | Priya | HR | 60000
4 | Neha | HR | 90000
5 | Raj | Finance | 70000
❓ Find all employees whose salary is greater than the average salary of the entire company.
💡 Approach
First, calculate the average salary across all employees.
Then compare every employee's salary with that average.
Company average:
(50000 + 80000 + 60000 + 90000 + 70000) / 5
= 70000
Employees earning more than 70000:
Rahul → 80000
Neha → 90000
📌 SQL Solution
SELECT
employee_id,
employee_name,
department,
salary
FROM Employee
WHERE salary > (
SELECT AVG(salary)
FROM Employee
);
🔎 How does it work?
The subquery:
SELECT AVG(salary)
FROM Employee;
calculates the company-wide average:
70000
The outer query then checks:
WHERE salary > 70000
and returns only employees earning above that amount.
📌 Expected Result:
employee_name | department | salary
--------------|------------|-------
Rahul | IT | 80000
Neha | HR | 90000
Double Tap ❤️ For More
-----
1.33 ₽ · /balance_helpemployee_id | employee_name | department | salary
------------|---------------|------------|-------
1 | Amit | IT | 60000
2 | Rahul | IT | 80000
3 | Priya | HR | 70000
4 | Neha | HR | 90000
5 | Raj | Finance | 85000
6 | Karan | Finance | 95000
❓ Find the department that has the highest average salary.
💡 Approach
First, calculate the average salary for every department.
Then, find the department with the highest average.
Department averages:
IT → (60000 + 80000) / 2 = 70000
HR → (70000 + 90000) / 2 = 80000
Finance → (85000 + 95000) / 2 = 90000
Therefore:
Finance → 90000
📌 SQL Solution
SELECT
department,
AVG(salary) AS avg_salary
FROM Employee
GROUP BY department
ORDER BY avg_salary DESC
LIMIT 1;
Expected result:
department | avg_salary
-----------|-----------
Finance | 90000
🔎 How does it work?
1️⃣ "GROUP BY department"
Creates one group for each department.
2️⃣ "AVG(salary)"
Calculates the average salary within each department.
3️⃣ "ORDER BY avg_salary DESC"
Places the department with the highest average first.
4️⃣ "LIMIT 1"
Returns only the top department.
⚠️ Interview Trap
What if two departments have the same highest average salary?
For example:
IT → 80000
HR → 80000
Finance → 75000
"LIMIT 1" would return only one department.
If the interviewer asks:
👉 "Find all departments having the highest average salary"
then use a ranking approach:
SELECT department, avg_salary
FROM (
SELECT
department,
AVG(salary) AS avg_salary,
DENSE_RANK() OVER (
ORDER BY AVG(salary) DESC
) AS rnk
FROM Employee
GROUP BY department
) d
WHERE rnk = 1;
Now both IT and HR would be returned.
🎯 Double Tap ❤️ For More
-----
1.3 ₽ · /balance_helpsale_id | sale_date | amount
--------|------------|-------
1 | 2026-01-01 | 1000
2 | 2026-01-02 | 1500
3 | 2026-01-03 | 800
4 | 2026-01-04 | 1200
❓ Calculate the cumulative (running) sales amount for each day.
💡 Approach
A running total means:
Current day's sales + all previous sales
For example:
1000
1000 + 1500 = 2500
2500 + 800 = 3300
3300 + 1200 = 4500
The easiest approach is to use the "SUM()" window function.
📌 SQL Solution
SELECT
sale_date,
amount,
SUM(amount) OVER (
ORDER BY sale_date
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
) AS running_total
FROM Sales
ORDER BY sale_date;
🔎 How does it work?
1️⃣ "ORDER BY sale_date"
Determines the order in which the running total is calculated.
2️⃣ "SUM(amount) OVER(...)"
Calculates the sum without collapsing the rows like a normal "GROUP BY".
3️⃣ "UNBOUNDED PRECEDING"
Means:
Start from the first row.
4️⃣ "CURRENT ROW"
Means:
Include the current row in the total.
So the calculation becomes:
Date Amount Running Total
---------- -------- -------------
Jan 01 1000 1000
Jan 02 1500 2500
Jan 03 800 3300
Jan 04 1200 4500
⚠️ Interview Trap
Don't use:
GROUP BY sale_date
for a running total.
"GROUP BY" collapses rows into groups.
A window function allows us to calculate an aggregate while keeping individual rows.
Also, if multiple rows can have the same "sale_date", be careful about the ordering. A unique column such as "sale_id" may need to be included:
SUM(amount) OVER (
ORDER BY sale_date, sale_id
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
)
🎯 Double Tap ❤️ For More
-----
1.31 ₽ · /balance_help