Data Analytics
Perfect channel to learn Data Analytics Learn SQL, Python, Alteryx, Tableau, Power BI and many more For Promotions: @coderfun @love_data
Mostrar más📈 Análisis del canal de Telegram Data Analytics
El canal Data Analytics (@sqlspecialist) en el segmento lingüístico de Inglés es un actor destacado. Actualmente la comunidad reúne a 109 708 suscriptores, ocupando la posición 1 117 en la categoría Tecnologías y Aplicaciones y el puesto 2 334 en la región India.
📊 Métricas de audiencia y dinámica
Desde su creación el невідомо, el proyecto ha mostrado un crecimiento acelerado, reuniendo a 109 708 suscriptores.
Según los últimos datos del 25 junio, 2026, el canal mantiene una actividad estable. En los últimos 30 días la variación de miembros fue de 596, y en las últimas 24 horas de 55, conservando un alto alcance.
- Estado de verificación: No verificado
- Tasa de interacción (ER): El promedio de interacción de la audiencia es 2.69%. Durante las primeras 24 horas tras publicar, el contenido suele obtener 0.78% de reacciones respecto al total de suscriptores.
- Alcance de las publicaciones: Cada publicación recibe en promedio 2 948 visualizaciones. En el primer día suele acumular 853 visualizaciones.
- Reacciones e interacción: La audiencia responde de forma activa: el promedio de reacciones por publicación es 8.
- Intereses temáticos: El contenido se centra en temas clave como row, sql, analytic, analyst, visualization.
📝 Descripción y política de contenido
El autor describe el recurso como un espacio para expresar opiniones subjetivas:
“Perfect channel to learn Data Analytics
Learn SQL, Python, Alteryx, Tableau, Power BI and many more
For Promotions: @coderfun @love_data”
Gracias a la alta frecuencia de actualizaciones (últimos datos recibidos el 26 junio, 2026), el canal mantiene la vigencia y un amplio alcance. La analítica demuestra que la audiencia interactúa activamente con el contenido, lo que lo convierte en un punto de referencia dentro de la categoría Tecnologías y Aplicaciones.
CREATE TABLE Customers ( CustomerID INT PRIMARY KEY, Name VARCHAR(50) ); CREATE TABLE Orders ( OrderID INT PRIMARY KEY, CustomerID INT, FOREIGN KEY (CustomerID) REFERENCES Customers(CustomerID) );
2. What are the different types of JOINs in SQL?
Answer:
SQL supports different types of JOINs to combine data from multiple tables:
INNER JOIN: Returns only matching records in both tables.
LEFT JOIN: Returns all records from the left table and matching records from the right table.
RIGHT JOIN: Returns all records from the right table and matching records from the left table.
FULL OUTER JOIN: Returns all records from both tables, with NULLs where there is no match.
SELF JOIN: A table is joined with itself.
CROSS JOIN: Produces a Cartesian product of both tables.
Example:
SELECT Customers.Name, Orders.OrderID FROM Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID;
3. What are Pivot Tables in Excel, and why are they used?
Answer:
A Pivot Table in Excel allows users to summarize, analyze, explore, and present data dynamically. It helps in:
Summarizing large datasets quickly.
Performing calculations like sum, count, average, etc.
Creating reports without using complex formulas.
Example Use Case:
If you have sales data with columns for region, product, and revenue, a pivot table can show total revenue by region and product category.
Steps to create a Pivot Table:
Select your dataset.
Go to Insert → Pivot Table.
Choose where to place the Pivot Table.
Drag fields into Rows, Columns, Values, and Filters.
4. Explain the difference between COUNT(), COUNT(*), and COUNT(column_name) in SQL.
Answer:
COUNT(): Returns the number of rows where a column is NOT NULL.
COUNT(*): Returns the total number of rows in a table, including NULL values.
COUNT(column_name): Counts non-NULL values in a specific column.
Example:
SELECT COUNT(*) FROM Orders; -- Counts all rows SELECT COUNT(CustomerID) FROM Orders; -- Counts only non-NULL CustomerIDs
5. How do you handle missing values in Python using Pandas?
Answer:
Missing values can be handled using Pandas functions:
Drop missing values: df.dropna()
Fill missing values: df.fillna(value)
Replace missing values: df.replace(to_replace, value)
Check for missing values: df.isnull().sum()
Example:
import pandas as pd df = pd.DataFrame({'A': [1, 2, None, 4], 'B': [None, 2, 3, 4]}) df.fillna(0, inplace=True) # Replace NaN with 0
I have curated best 80+ top-notch Data Analytics Resources 👇👇
https://t.me/DataSimplifier
Like this post for if you want me to continue the interview series 👍♥️
Share with credits: https://t.me/sqlspecialist
Hope it helps :)SELECT MAX(Salary) AS SecondHighestSalary FROM Employees WHERE Salary < (SELECT MAX(Salary) FROM Employees);
2️⃣ Challenge: Get Consecutive Login Streaks
Given a Logins table with UserID and LoginDate, find users who logged in for three consecutive days.
SELECT DISTINCT L1.UserID FROM Logins L1 JOIN Logins L2 ON L1.UserID = L2.UserID AND L1.LoginDate = L2.LoginDate - 1 JOIN Logins L3 ON L1.UserID = L3.UserID AND L1.LoginDate = L3.LoginDate - 2;
3️⃣ Challenge: Rank Employees by Salary Within Each Department
SELECT EmployeeID, Name, Department, Salary, RANK() OVER (PARTITION BY Department ORDER BY Salary DESC) AS SalaryRank FROM Employees;
✅ Action Plan for Today
Review Week 3 Topics – Revisit notes, practice stored procedures, and triggers.
Solve These Complex Challenges – Try modifying them for different cases.
Ask Yourself:
What happens if two employees have the same second-highest salary?
How would you handle ties in ranking employees?
Can you optimize these queries for better performance?
🔝 SQL 30 Days Challenge
Here you can find SQL Interview Resources👇
https://t.me/sqlanalyst
Like this post if you want me to continue this SQL series 👍♥️
Share with credits: https://t.me/sqlspecialist
Hope it helps :)CREATE TRIGGER trg_AfterInsert ON Employees AFTER INSERT AS BEGIN PRINT 'A new employee record has been inserted!'; END;
Test the trigger:
INSERT INTO Employees (EmployeeID, Name, Department) VALUES (101, 'John Doe', 'IT');
After execution, the message "A new employee record has been inserted!" appears.
4. INSTEAD OF Trigger Example
Prevents deleting employees from the Employees table but logs the request.
CREATE TRIGGER trg_InsteadOfDelete ON Employees INSTEAD OF DELETE AS BEGIN PRINT 'Delete operation blocked. Logging attempt...'; INSERT INTO DeleteLogs (EmployeeID, DeleteTime) SELECT EmployeeID, GETDATE() FROM deleted; END;
Test the trigger:
DELETE FROM Employees WHERE EmployeeID = 101;
Instead of deleting, it logs the deletion attempt.
5. Viewing & Dropping Triggers
List triggers on a table:
SELECT name FROM sys.triggers WHERE parent_id = OBJECT_ID('Employees');
Drop a trigger:
DROP TRIGGER trg_AfterInsert;
6. Best Practices for Triggers:
✅ Keep triggers lightweight to avoid performance issues.
✅ Use triggers only when necessary (consider stored procedures for flexibility).
✅ Avoid recursive triggers (where a trigger fires another trigger).
✅ Log actions to track unwanted modifications.
Action Steps:
Create an AFTER INSERT trigger to log new entries into an audit table.
Create an INSTEAD OF UPDATE trigger to prevent salary updates above a certain limit.
Experiment with retrieving deleted records using the deleted table inside a trigger.
🔝 SQL 30 Days Challenge
Here you can find SQL Interview Resources👇
https://t.me/sqlanalyst
Like this post if you want me to continue this SQL series 👍♥️
Share with credits: https://t.me/sqlspecialist
Hope it helps :)CREATE TRIGGER trg_AfterInsert ON Employees AFTER INSERT AS BEGIN PRINT 'A new employee record has been inserted!'; END;
Test the trigger:
INSERT INTO Employees (EmployeeID, Name, Department) VALUES (101, 'John Doe', 'IT');
After execution, the message "A new employee record has been inserted!" appears.
4. INSTEAD OF Trigger Example
Prevents deleting employees from the Employees table but logs the request.
CREATE TRIGGER trg_InsteadOfDelete ON Employees INSTEAD OF DELETE AS BEGIN PRINT 'Delete operation blocked. Logging attempt...'; INSERT INTO DeleteLogs (EmployeeID, DeleteTime) SELECT EmployeeID, GETDATE() FROM deleted; END;
Test the trigger:
DELETE FROM Employees WHERE EmployeeID = 101;
Instead of deleting, it logs the deletion attempt.
5. Viewing & Dropping Triggers
List triggers on a table:
SELECT name FROM sys.triggers WHERE parent_id = OBJECT_ID('Employees');
Drop a trigger:
DROP TRIGGER trg_AfterInsert;
6. Best Practices for Triggers:
✅ Keep triggers lightweight to avoid performance issues.
✅ Use triggers only when necessary (consider stored procedures for flexibility).
✅ Avoid recursive triggers (where a trigger fires another trigger).
✅ Log actions to track unwanted modifications.
Action Steps:
Create an AFTER INSERT trigger to log new entries into an audit table.
Create an INSTEAD OF UPDATE trigger to prevent salary updates above a certain limit.
Experiment with retrieving deleted records using the deleted table inside a trigger.
🔝 SQL 30 Days Challenge
Here you can find SQL Interview Resources👇
https://topmate.io/analyst/864764
Like this post if you want me to continue this SQL series 👍♥️
Share with credits: https://t.me/sqlspecialist
Hope it helps :)CREATE PROCEDURE ProcedureName AS BEGIN -- SQL statements END;
Example:
A procedure to fetch all employees:
CREATE PROCEDURE GetAllEmployees AS BEGIN SELECT * FROM Employees; END;
Execute the procedure:
EXEC GetAllEmployees;
4. Stored Procedures with Parameters
Stored procedures can take input and output parameters.
Example:
Procedure to fetch employees based on department ID:
CREATE PROCEDURE GetEmployeesByDept @DeptID INT AS BEGIN SELECT * FROM Employees WHERE DepartmentID = @DeptID; END;
Execute with a parameter:
EXEC GetEmployeesByDept @DeptID = 2;
5. Stored Procedure with Output Parameters
Used to return values from a procedure.
Example:
A procedure to count employees in a department:
CREATE PROCEDURE GetEmployeeCountByDept @DeptID INT, @EmpCount INT OUTPUT AS BEGIN SELECT @EmpCount = COUNT(*) FROM Employees WHERE DepartmentID = @DeptID; END;
Call the procedure and get the output value:
DECLARE @Count INT; EXEC GetEmployeeCountByDept @DeptID = 2, @EmpCount = @Count OUTPUT; PRINT @Count;
6. Modifying and Dropping a Stored Procedure
Modify an existing procedure:
ALTER PROCEDURE ProcedureName AS BEGIN
-- Updated SQL statements END;
Drop a stored procedure:
DROP PROCEDURE ProcedureName;
7. Best Practices for Stored Procedures
Use meaningful names for easy identification.
Avoid SELECT ; instead, specify required columns.
Use parameters instead of hardcoded values.
Handle errors using TRY...CATCH.
Action Steps:
Create a stored procedure to insert a new employee into the Employees table.
Write a procedure with an input parameter for filtering records.
Experiment with an output parameter to return calculated values.
🔝 SQL 30 Days Challenge
Here you can find SQL Interview Resources👇
https://t.me/sqlanalyst
Like this post if you want me to continue this SQL series 👍♥️
Share with credits: https://t.me/sqlspecialist
Hope it helps :)BEGIN TRANSACTION;
Commit a Transaction
Saves the changes made during the transaction:
COMMIT;
Rollback a Transaction
Reverts the changes made during the transaction:
ROLLBACK;
4. Example
Without Transactions
If an error occurs, only part of the data may be saved, causing inconsistencies:
UPDATE Accounts SET Balance = Balance - 500 WHERE AccountID = 1; UPDATE Accounts SET Balance = Balance + 500 WHERE AccountID = 2;
With Transactions
Ensures both operations are completed or none:
BEGIN TRANSACTION; UPDATE Accounts SET Balance = Balance - 500 WHERE AccountID = 1; UPDATE Accounts SET Balance = Balance + 500 WHERE AccountID = 2; IF @@ERROR <> 0 ROLLBACK; ELSE COMMIT;
If either UPDATE fails, the entire transaction is rolled back.
5. Savepoints
Savepoints allow partial rollback within a transaction:
BEGIN TRANSACTION; UPDATE Accounts SET Balance = Balance - 500 WHERE AccountID = 1; SAVE TRANSACTION SavePoint1; UPDATE Accounts SET Balance = Balance + 500 WHERE AccountID = 2; ROLLBACK TRANSACTION SavePoint1; -- Reverts the second update only COMMIT;
6. Isolation Levels:
Control how transactions interact with each other:
Read Uncommitted: Allows dirty reads (data not yet committed).
Read Committed: Prevents dirty reads (default in most databases).
Repeatable Read: Prevents dirty reads and ensures no changes to data during the transaction.
Serializable: Ensures complete isolation but may reduce performance.
Set the isolation level:
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; BEGIN TRANSACTION;
7. Best Practices:
Keep transactions short to reduce locking and improve performance.
Always use COMMIT or ROLLBACK explicitly.
Test for errors within transactions to handle rollbacks.
Use appropriate isolation levels based on requirements.
Action Steps:
Write a transaction to transfer money between two accounts.
Experiment with savepoints for partial rollbacks.
Explore the effect of different isolation levels on concurrent transactions.
🔝 SQL 30 Days Challenge
Here you can find SQL Interview Resources👇
https://t.me/sqlanalyst
Like this post if you want me to continue this SQL series 👍♥️
Share with credits: https://t.me/sqlspecialist
Hope it helps :)CREATE CLUSTERED INDEX IndexName ON TableName (ColumnName);
Example:
CREATE CLUSTERED INDEX IDX_EmployeeID ON Employees (EmployeeID);
b) Non-Clustered Index
CREATE NONCLUSTERED INDEX IndexName ON TableName (ColumnName);
Example:
CREATE NONCLUSTERED INDEX IDX_Salary ON Employees (Salary);
c) Unique Index
CREATE UNIQUE INDEX IndexName ON TableName (ColumnName);
Example:
CREATE UNIQUE INDEX IDX_UniqueEmail ON Employees (Email);
5. Viewing Indexes
To list all indexes on a table:
EXEC sp_helpindex 'TableName';
6. Dropping Indexes
To remove an index:
DROP INDEX IndexName ON TableName;
Example:
DROP INDEX IDX_Salary ON Employees;
7. Limitations of Indexes
Slows down INSERT, UPDATE, and DELETE operations due to maintenance.
Requires additional storage.
Too many indexes can degrade performance.
8. Best Practices:
Use indexes for frequently queried columns.
Avoid indexing small tables or columns with low selectivity.
Regularly monitor and optimize index usage.
Action Steps:
Create clustered and non-clustered indexes for common queries in your database.
Check the performance difference using indexed vs non-indexed columns.
Drop unused or redundant indexes.
🔝 SQL 30 Days Challenge
Here you can find SQL Interview Resources👇
https://t.me/sqlanalyst
Like this post if you want me to continue this SQL series 👍♥️
Share with credits: https://t.me/sqlspecialist
Hope it helps :)CREATE VIEW ViewName AS
SELECT Column1, Column2
FROM TableName
WHERE Condition;
Example:
Create a view to show employees with a salary greater than 5000:
CREATE VIEW HighSalaryEmployees AS
SELECT EmployeeID, Name, Salary
FROM Employees
WHERE Salary > 5000;
To query the view:
SELECT * FROM HighSalaryEmployees;
4. Updating Data via Views
If the view is based on a single table and includes all the necessary primary keys, you can update data through the view:
UPDATE HighSalaryEmployees
SET Salary = 7000
WHERE EmployeeID = 1;
5. Dropping a View
To remove a view:
DROP VIEW ViewName;
6. Materialized Views
A materialized view stores query results physically, unlike regular views. It is refreshed periodically to reflect changes in the underlying data.
7. Why Use Materialized Views?
1. Improve query performance for complex calculations.
2. Reduce load on the database for frequently used queries.
8. Syntax for Creating a Materialized View
CREATE MATERIALIZED VIEW MaterializedViewName
AS
SELECT Column1, Column2
FROM TableName
WHERE Condition;
9. Refreshing Materialized Views
Materialized views can be refreshed manually or automatically:
-- Manually refresh
REFRESH MATERIALIZED VIEW MaterializedViewName;
10. Key Differences Between Views and Materialized Views
Views: Always fetch data in real-time from the underlying tables.
Materialized Views: Store data physically and need refreshing to update.
Action Steps
1. Create a view for frequently used queries in your database.
2. Try updating data through a view (if allowed).
3. Experiment with creating and refreshing materialized views.
🔝 SQL 30 Days Challenge
Here you can find SQL Interview Resources👇
https://t.me/sqlanalyst
Like this post if you want me to continue this SQL series 👍♥️
Share with credits: https://t.me/sqlspecialist
Hope it helps :)
¡Ya disponible! Investigación de Telegram 2025 — los principales insights del año 
