Data Analytics
Perfect channel to learn Data Analytics Learn SQL, Python, Alteryx, Tableau, Power BI and many more For Promotions: @coderfun @love_data
Больше📈 Аналитический обзор Telegram-канала Data Analytics
Канал Data Analytics (@sqlspecialist) языкового сегмента Английский является активным участником. Сейчас сообщество объединяет 109 719 подписчиков, занимая 1 116 место в категории Технологии и приложения и 2 331 место в регионе Индия.
📊 Показатели аудитории и динамика
С момента создания невідомо проект демонстрирует стремительный рост, собрав аудиторию из 109 719 подписчиков.
Согласно последним данным от 26 июня, 2026, канал показывает стабильную активность. За последние 30 дней изменение числа участников составило 579, а за последние 24 часа — 1, при этом общий охват остаётся высоким.
- Статус верификации: Не верифицирован
- Уровень вовлечённости (ER): Средний показатель вовлечённости аудитории составляет 2.58%. В первые 24 часа после публикации контент обычно набирает 0.93% реакций от общего числа подписчиков.
- Охват публикаций: В среднем каждый пост получает 2 827 просмотров. В течение первых суток публикация набирает 1 016 просмотров.
- Реакции и взаимодействия: Аудитория активно поддерживает контент: среднее количество реакций на один пост — 7.
- Тематические интересы: Контент сосредоточен на ключевых темах, таких как row, sql, analytic, analyst, visualization.
📝 Описание и контентная политика
Автор описывает ресурс как площадку для выражения субъективного мнения:
“Perfect channel to learn Data Analytics
Learn SQL, Python, Alteryx, Tableau, Power BI and many more
For Promotions: @coderfun @love_data”
Благодаря высокой частоте обновлений (последние данные получены 27 июня, 2026) канал поддерживает актуальность и высокий уровень охвата публикаций. Аналитика показывает, что аудитория активно взаимодействует с контентом, что делает его важной точкой влияния в категории Технологии и приложения.
SELECT employee_name, department_id, salary
FROM employees
WHERE salary > 50000;
This query selects employees with a salary greater than 50,000 before any grouping is done.
HAVING Clause:
- Purpose: Filters groups after the GROUP BY clause has been applied.
- Usage: Used to filter groups of records based on aggregate functions.
- Example:
SELECT department_id, AVG(salary) as avg_salary
FROM employees
GROUP BY department_id
HAVING AVG(salary) > 50000;
This query calculates the average salary for each department and then filters out departments where the average salary is greater than 50,000.
Key Differences:
- Stage of Filtering: WHERE filters rows before aggregation (GROUP BY), while HAVING filters groups after aggregation.
- Use Case: Use WHERE for filtering individual rows based on conditions. Use HAVING for filtering groups based on aggregate functions like SUM, AVG, COUNT, etc.
Tip: Remember that WHERE is used for raw data filtering, and HAVING is used for filtered results based on aggregated data. This distinction helps in optimizing and structuring SQL queries correctly.
You can refer these SQL Interview Resources to learn more
Like this post if you want me to continue this SQL series 👍♥️
Share with credits: https://t.me/sqlspecialist
Hope it helps :)employees and departments, and you want to find employees whose salaries are above the average salary of their respective departments.
SELECT employee_name, salary, department_id
FROM employees e
WHERE salary > (
SELECT AVG(salary)
FROM employees
WHERE department_id = e.department_id
);
In this example:
- The outer query selects employee_name, salary, and department_id from the employees table.
- The correlated subquery calculates the average salary for each department_id by referring to the department_id from the outer query (e.department_id).
The subquery is executed for each row of the outer query, and it uses the value of department_id from the current row of the outer query to compute the average salary for that department. The outer query then selects only those employees whose salaries are greater than the average salary of their respective departments.
Tip: Correlated subqueries can be powerful for complex queries, but they can also impact performance because the subquery is executed multiple times. In such cases, consider optimizing or refactoring the query to use JOINs or other methods where possible.
You can refer these SQL Interview Resources to learn more
Like this post if you want me to continue this SQL series 👍♥️
Share with credits: https://t.me/sqlspecialist
Hope it helps :) CREATE TABLE employees (
employee_id INT PRIMARY KEY,
employee_name VARCHAR(100) NOT NULL,
department_id INT NOT NULL
);
2. UNIQUE Constraint:
- Ensures that all values in a column (or a combination of columns) are unique.
- Example:
CREATE TABLE departments (
department_id INT PRIMARY KEY,
department_name VARCHAR(100) UNIQUE
);
3. PRIMARY KEY Constraint:
- Uniquely identifies each row in a table.
- Automatically creates a UNIQUE constraint on the specified column(s).
- Example:
CREATE TABLE orders (
order_id INT PRIMARY KEY,
customer_id INT,
order_date DATE,
total_amount DECIMAL(10,2)
);
4. FOREIGN KEY Constraint:
- Establishes a relationship between two tables and ensures referential integrity.
- Example:
CREATE TABLE orders (
order_id INT PRIMARY KEY,
customer_id INT,
FOREIGN KEY (customer_id) REFERENCES customers(customer_id)
);
5. CHECK Constraint:
- Ensures that all values in a column satisfy a specific condition.
- Example:
CREATE TABLE employees (
employee_id INT PRIMARY KEY,
employee_name VARCHAR(100),
salary DECIMAL(10,2) CHECK (salary >= 0)
);
6. DEFAULT Constraint:
- Provides a default value for a column when no value is specified.
- Example:
CREATE TABLE products (
product_id INT PRIMARY KEY,
product_name VARCHAR(100),
quantity INT DEFAULT 0
);
Tip: SQL constraints play a vital role in maintaining data integrity by enforcing rules on table columns. Understanding their types and usage is essential for designing efficient and reliable database schemas.
You can refer these SQL Interview Resources to learn more
Like this post if you want me to continue this SQL series 👍♥️
Share with credits: https://t.me/sqlspecialist
Hope it helps :)employees table with columns employee_id, employee_name, and manager_id. Here's how you can use a self-join to retrieve the name of each employee along with their manager's name:
SELECT e.employee_name AS employee, m.employee_name AS manager
FROM employees e
JOIN employees m ON e.manager_id = m.employee_id;
In this example:
- employees e and employees m are aliases for the same employees table.
- The join condition e.manager_id = m.employee_id connects each employee (e) with their corresponding manager (m) by matching manager_id with employee_id.
Tip: Use self-joins when you need to create relationships between rows within the same table, such as hierarchical data (e.g., employees and managers). Always use table aliases to differentiate between the roles of each instance of the table in the self-join operation. SELECT *
FROM employees e
INNER JOIN departments d ON e.department_id = d.department_id;
This query retrieves all rows from employees and departments where there is a matching department_id.
2. LEFT JOIN (or LEFT OUTER JOIN):
- Returns all rows from the left table (first table specified in the JOIN clause) and matching rows from the right table.
- If there is no match, NULL values are returned for columns from the right table.
- Example:
SELECT *
FROM employees e
LEFT JOIN departments d ON e.department_id = d.department_id;
This query retrieves all rows from employees, and the matching rows from departments. If an employee does not belong to any department, the corresponding department columns will contain NULL values.
3. RIGHT JOIN (or RIGHT OUTER JOIN):
- Returns all rows from the right table (second table specified in the JOIN clause) and matching rows from the left table.
- If there is no match, NULL values are returned for columns from the left table.
- Example:
SELECT *
FROM employees e
RIGHT JOIN departments d ON e.department_id = d.department_id;
This query retrieves all rows from departments, and the matching rows from employees. If a department does not have any employees, the corresponding employee columns will contain NULL values.
4. FULL JOIN (or FULL OUTER JOIN):
- Returns all rows when there is a match in either the left or right table.
- If there is no match, NULL values are returned for columns from the table that lacks a matching row.
- Example:
SELECT *
FROM employees e
FULL JOIN departments d ON e.department_id = d.department_id;
This query retrieves all rows from both employees and departments, combining them based on the department_id. If there are departments without employees or employees without departments, their respective columns will contain NULL values.
Tip: Understanding different types of SQL joins helps in querying data from multiple tables efficiently based on specific relationship requirements.COUNT() function returns the number of rows that match a specified criterion.
Syntax:
SELECT COUNT(column_name)
FROM table_name
WHERE condition;
Example:
Count the number of customers in the Customers table.
SELECT COUNT(CustomerID) AS NumberOfCustomers
FROM Customers;
### 2. SUM()
The SUM() function returns the total sum of a numeric column.
Syntax:
SELECT SUM(column_name)
FROM table_name
WHERE condition;
Example:
Calculate the total sales in the Orders table.
SELECT SUM(Sales) AS TotalSales
FROM Orders;
### 3. AVG()
The AVG() function returns the average value of a numeric column.
Syntax:
SELECT AVG(column_name)
FROM table_name
WHERE condition;
Example:
Find the average order amount in the Orders table.
SELECT AVG(OrderAmount) AS AverageOrder
FROM Orders;
### 4. MIN()
The MIN() function returns the smallest value of the selected column.
Syntax:
SELECT MIN(column_name)
FROM table_name
WHERE condition;
Example:
Find the lowest price in the Products table.
SELECT MIN(Price) AS LowestPrice
FROM Products;
### 5. MAX()
The MAX() function returns the largest value of the selected column.
Syntax:
SELECT MAX(column_name)
FROM table_name
WHERE condition;
Example:
Find the highest price in the Products table.
SELECT MAX(Price) AS HighestPrice
FROM Products;
### Using Aggregate Functions with GROUP BY
Aggregate functions are often used with the GROUP BY clause to group rows that have the same values in specified columns into summary rows.
Syntax:
SELECT column_name, aggregate_function(column_name)
FROM table_name
WHERE condition
GROUP BY column_name;
Example:
Get the total sales for each product.
SELECT ProductID, SUM(Sales) AS TotalSales
FROM Orders
GROUP BY ProductID;
### Using Aggregate Functions with HAVING
The HAVING clause was added to SQL because the WHERE keyword could not be used with aggregate functions. HAVING allows us to filter records that work on summarized GROUP BY results.
Syntax:
SELECT column_name, aggregate_function(column_name)
FROM table_name
WHERE condition
GROUP BY column_name
HAVING aggregate_function(column_name) condition;
Example:
Get the total sales for each product where total sales exceed $1000.
SELECT ProductID, SUM(Sales) AS TotalSales
FROM Orders
GROUP BY ProductID
HAVING SUM(Sales) > 1000;
### Combining Aggregate Functions
You can use multiple aggregate functions in the same query.
Example:
Get the total number of orders, average order amount, minimum order amount, and maximum order amount.
SELECT COUNT(OrderID) AS NumberOfOrders,
AVG(OrderAmount) AS AverageOrder,
MIN(OrderAmount) AS MinOrder,
MAX(OrderAmount) AS MaxOrder
FROM Orders;
### Summary
- COUNT(): Counts rows.
- SUM(): Sums up values.
- AVG(): Averages values.
- MIN(): Finds the minimum value.
- MAX(): Finds the maximum value.
- GROUP BY: Groups rows that have the same values.
- HAVING: Filters groups based on aggregate functions.
You can refer these SQL Interview Resources to learn more
Like this post if you want me to continue this SQL series 👍♥️
Share with credits: https://t.me/sqlspecialist
Hope it helps :)CREATE TABLE employees (
employee_id INT PRIMARY KEY,
first_name CHAR(50),
last_name CHAR(50)
);
In this example, first_name and last_name columns will always store strings of 50 characters, padded with spaces if the actual name is shorter than 50 characters.
VARCHAR Data Type:
- Variable-Length Character Data Type: VARCHAR stores variable-length strings where the length can vary up to a maximum length specified during table creation.
- It does not pad spaces, saving storage space compared to CHAR.
- Suitable for columns where the length of the data varies significantly.
Example:
CREATE TABLE products (
product_id INT PRIMARY KEY,
product_name VARCHAR(100),
description VARCHAR(255)
);
In this example, product_name can store variable-length product names up to 100 characters, and description can store variable-length descriptions up to 255 characters.
Tip: Use CHAR when the length of the data is consistent and fixed to avoid overhead associated with variable-length storage. Use VARCHAR when the length of the data varies significantly to optimize storage space.CREATE TABLE employees (
employee_id INT PRIMARY KEY,
name VARCHAR(100),
department_id INT
);
In this example, employee_id is designated as the primary key for the employees table. It ensures each employee has a unique identifier, and this column cannot contain NULL values.
Unique Key:
- A unique key is a constraint that ensures all values in a column or a set of columns are distinct from one another (no duplicates).
- Unlike a primary key, it can allow NULL values, but if a column is designated as unique, only one NULL is allowed.
- A table can have multiple unique key constraints defined.
Example:
CREATE TABLE departments (
department_id INT PRIMARY KEY,
department_name VARCHAR(100) UNIQUE,
manager_id INT UNIQUE
);
In this example, department_name and manager_id are unique keys for the departments table. It ensures that each department has a unique name, and each manager is assigned to a unique department.
Tip: Use a primary key when you need a column or set of columns to uniquely identify each row in a table. Use a unique key when you need to ensure that all values in a column or set of columns are distinct, with the flexibility to allow NULL values except where the column itself is designated as unique.SELECT name
FROM employees e
WHERE salary > (
SELECT AVG(salary)
FROM employees
WHERE department_id = e.department_id
);
In this example, the subquery SELECT AVG(salary) FROM employees WHERE department_id = e.department_id is correlated because it references e.department_id from the outer query.
Non-correlated Subquery:
- A non-correlated subquery is an independent subquery that can execute on its own without relying on the outer query.
- It executes only once and returns a single value or set of values.
- It can be used independently within a query.
Example:
SELECT name, salary
FROM employees
WHERE salary > (
SELECT AVG(salary)
FROM employees
);
In this example, the subquery SELECT AVG(salary) FROM employees is non-correlated because it does not reference any columns from the outer query.
Tip: Correlated subqueries are generally executed row by row, making them less efficient than non-correlated subqueries. Use non-correlated subqueries when you need to retrieve independent results, and use correlated subqueries when you need to filter results based on conditions from the outer query.SELECT
employee_id,
department_id,
salary,
AVG(salary) OVER (PARTITION BY department_id) AS avg_department_salary
FROM
employees;
In this example, the AVG function is used as a window function to calculate the average salary of employees within each department, without collapsing the rows into a single summary row.
Tip: Emphasize that window functions are powerful for performing calculations that require both detail and summary data, such as running totals, moving averages, or rank calculations within a specific partition of the dataset.
You can refer these SQL Interview Resources to learn more
Like this post if you want me to continue this SQL series 👍♥️
Share with credits: https://t.me/sqlspecialist
Hope it helps :)
Уже доступно! Исследование Telegram 2025 — ключевые инсайты года 
