Data Analytics – Telegram
Data Analytics
108K subscribers
126 photos
2 files
791 links
Perfect channel to learn Data Analytics

Learn SQL, Python, Alteryx, Tableau, Power BI and many more

For Promotions: @coderfun @love_data
Download Telegram
📊 Excel Hack of the Week

Did you know you can use Flash Fill in Excel to automatically clean and format data without writing formulas?

📝 How to Use Flash Fill?

1️⃣ Type the first correct value manually in the adjacent column.
2️⃣ Press Ctrl + E (or go to Data > Flash Fill).
3️⃣ Excel will recognize the pattern and fill in the rest automatically!

🔍 Example:
Extract first names from "John Doe" → Type "John" → Press Ctrl + E → Done!
Format phone numbers from "1234567890" to "(123) 456-7890" in seconds!
Convert dates from "01-02-2024" to "February 1, 2024" instantly!

📌 Bonus: Try using Flash Fill for splitting names, fixing email formats, or even extracting numbers from text.

You can join @excel_data for free Excel Resources.

Like this post for more data analytics tricks 👍♥️

Share with credits: https://news.1rj.ru/str/sqlspecialist

Hope it helps :)
8👍7🔥2
Python for Data Analysis: Must-Know Libraries 👇👇

Python is one of the most powerful tools for Data Analysts, and these libraries will supercharge your data analysis workflow by helping you clean, manipulate, and visualize data efficiently.

🔥 Essential Python Libraries for Data Analysis:

Pandas – The go-to library for data manipulation. It helps in filtering, grouping, merging datasets, handling missing values, and transforming data into a structured format.

📌 Example: Loading a CSV file and displaying the first 5 rows:

import pandas as pd df = pd.read_csv('data.csv') print(df.head()) 


NumPy – Used for handling numerical data and performing complex calculations. It provides support for multi-dimensional arrays and efficient mathematical operations.

📌 Example: Creating an array and performing basic operations:

import numpy as np arr = np.array([10, 20, 30]) print(arr.mean()) # Calculates the average 


Matplotlib & Seaborn – These are used for creating visualizations like line graphs, bar charts, and scatter plots to understand trends and patterns in data.

📌 Example: Creating a basic bar chart:

import matplotlib.pyplot as plt plt.bar(['A', 'B', 'C'], [5, 7, 3]) plt.show() 


Scikit-Learn – A must-learn library if you want to apply machine learning techniques like regression, classification, and clustering on your dataset.

OpenPyXL – Helps in automating Excel reports using Python by reading, writing, and modifying Excel files.

💡 Challenge for You!
Try writing a Python noscript that:
1️⃣ Reads a CSV file
2️⃣ Cleans missing data
3️⃣ Creates a simple visualization

React with ♥️ if you want me to post the noscript for above challenge! ⬇️

Share with credits: https://news.1rj.ru/str/sqlspecialist

Hope it helps :)
👍1511🎉1
🔍 Real-World Data Analyst Tasks & How to Solve Them

As a Data Analyst, your job isn’t just about writing SQL queries or making dashboards—it’s about solving business problems using data. Let’s explore some common real-world tasks and how you can handle them like a pro!

📌 Task 1: Cleaning Messy Data

Before analyzing data, you need to remove duplicates, handle missing values, and standardize formats.

Solution (Using Pandas in Python):

import pandas as pd  
df = pd.read_csv('sales_data.csv')
df.drop_duplicates(inplace=True) # Remove duplicate rows
df.fillna(0, inplace=True) # Fill missing values with 0
print(df.head())


💡 Tip: Always check for inconsistent spellings and incorrect date formats!


📌 Task 2: Analyzing Sales Trends

A company wants to know which months have the highest sales.

Solution (Using SQL):

SELECT MONTH(SaleDate) AS Month, SUM(Quantity * Price) AS Total_Revenue  
FROM Sales
GROUP BY MONTH(SaleDate)
ORDER BY Total_Revenue DESC;


💡 Tip: Try adding YEAR(SaleDate) to compare yearly trends!


📌 Task 3: Creating a Business Dashboard

Your manager asks you to create a dashboard showing revenue by region, top-selling products, and monthly growth.

Solution (Using Power BI / Tableau):

👉 Add KPI Cards to show total sales & profit

👉 Use a Line Chart for monthly trends

👉 Create a Bar Chart for top-selling products

👉 Use Filters/Slicers for better interactivity

💡 Tip: Keep your dashboards clean, interactive, and easy to interpret!

Like this post for more content like this ♥️

Share with credits: https://news.1rj.ru/str/sqlspecialist

Hope it helps :)
19👍12🥰1
📊 Power BI / Tableau Dashboard Inspiration

🚀 Want to Build Stunning Dashboards? Try This!

Creating an interactive and insightful dashboard is a key skill for any Data Analyst. Here’s a simple Power BI / Tableau dashboard idea to practice!

📝 Project Idea: Sales Performance Dashboard

📌 Dataset: Use free datasets from Kaggle or Sample Superstore (Tableau)

📌 Key Visuals to Include:
Total Sales, Profit, and Orders (KPI Cards)
Sales Trend Over Time (Line Chart)
Top 5 Best-Selling Products (Bar Chart)
Sales by Region & Category (Map & Pie Chart)
Customer Segmentation (Filters & Slicers)

💡 Pro Tips:
🔹 Use conditional formatting to highlight trends 📊
🔹 Add slicers to make the dashboard interactive 🔍
🔹 Keep colors consistent for better readability 🎨

📌 Bonus Challenge: Can you create a drill-through feature to view details by region?

Join @dataportfolio to find free data analytics projects

Like this post for more content like this ♥️

Share with credits: https://news.1rj.ru/str/sqlspecialist

Hope it helps :)
👍1610👏2
🎯 Top 20 SQL Interview Questions You Must Know

SQL is one of the most in-demand skills for Data Analysts.

Here are 20 SQL interview questions that frequently appear in job interviews.

📌 Basic SQL Questions

1️⃣ What is the difference between INNER JOIN and LEFT JOIN?
2️⃣ How does GROUP BY work, and why do we use it?
3️⃣ What is the difference between HAVING and WHERE?
4️⃣ How do you remove duplicate rows from a table?
5️⃣ What is the difference between RANK(), DENSE_RANK(), and ROW_NUMBER()?

📌 Intermediate SQL Questions

6️⃣ How do you find the second highest salary from an Employee table?
7️⃣ What is a Common Table Expression (CTE), and when should you use it?
8️⃣ How do you identify missing values in a dataset using SQL?
9️⃣ What is the difference between UNION and UNION ALL?
🔟 How do you calculate a running total in SQL?

📌 Advanced SQL Questions

1️⃣1️⃣ How does a self-join work? Give an example.
1️⃣2️⃣ What is a window function, and how is it different from GROUP BY?
1️⃣3️⃣ How do you detect and remove duplicate records in SQL?
1️⃣4️⃣ Explain the difference between EXISTS and IN.
1️⃣5️⃣ What is the purpose of COALESCE()?

📌 Real-World SQL Scenarios

1️⃣6️⃣ How do you optimize a slow SQL query?
1️⃣7️⃣ What is indexing in SQL, and how does it improve performance?
1️⃣8️⃣ Write an SQL query to find customers who have placed more than 3 orders.
1️⃣9️⃣ How do you calculate the percentage of total sales for each category?
2️⃣0️⃣ What is the use of CASE statements in SQL?

React with ♥️ if you want me to post the correct answers in next posts! ⬇️

Share with credits: https://news.1rj.ru/str/sqlspecialist

Hope it helps :)
48👍31🔥1👏1
Data Analytics
🎯 Top 20 SQL Interview Questions You Must Know SQL is one of the most in-demand skills for Data Analysts. Here are 20 SQL interview questions that frequently appear in job interviews. 📌 Basic SQL Questions 1️⃣ What is the difference between INNER JOIN…
SQL Interview Questions with detailed answers:

1️⃣ What is the difference between INNER JOIN and LEFT JOIN?

INNER JOIN: It returns only the rows where there is a match between both tables.

Example:

SELECT * FROM employees INNER JOIN departments ON employees.department_id = departments.department_id; 

This will only return rows where an employee has a department.

LEFT JOIN: It returns all the rows from the left table, along with matching rows from the right table. If there is no match, NULL values will be returned for the right table.

Example:

SELECT * FROM employees LEFT JOIN departments ON employees.department_id = departments.department_id; 


This will return all employees, even if they don't belong to any department (NULL will be returned for department-related columns).

Like this post if you want me to continue posting all the answers 👍♥️

Share with credits: https://news.1rj.ru/str/sqlspecialist

Hope it helps :)
18👍18
SQL Interview Questions with detailed answers:

2️⃣ How does GROUP BY work, and why do we use it?

GROUP BY is used to arrange identical data into groups, often for performing aggregation functions (like COUNT, SUM, AVG, etc.) on each group. It's typically used with aggregate functions to summarize data.

Example:
Consider a sales table:

SELECT department_id, SUM(salary) AS total_salary FROM employees GROUP BY department_id; 


Explanation:
GROUP BY department_id: This groups all rows in the employees table by their department.
SUM(salary): This calculates the total salary for each department.

The result will show the department_id along with the corresponding total salary.

Why use GROUP BY?
It allows you to analyze data at different levels of granularity (e.g., department, region) by summarizing data in a meaningful way.

Like this post if you want me to continue this SQL Interview Series♥️

Share with credits: https://news.1rj.ru/str/sqlspecialist

Hope it helps :)
👍2211
🧠 Case Study: How to Analyze a Business Problem Like a Pro

🚀 Want to solve real-world business problems? Here's how to approach it!

Data analysis isn’t just about writing queries or generating charts—it’s about solving business problems that drive key decisions.

Here’s a step-by-step guide to help you analyze business problems effectively:

📌 Step 1: Understand the Business Problem

First, understand the context. Speak with the stakeholders or team to clarify:

What is the business goal?

What data do you need to solve the problem?

What actions or decisions will the analysis lead to?


🔍 Example: A retail company wants to increase sales in a particular region. Your job is to identify the key factors affecting sales and come up with recommendations.

📌 Step 2: Gather the Right Data

After understanding the problem, ensure you have access to reliable data. This could include:

Sales data (transactions, customers, regions)

Marketing data (advertising campaigns, promotions)

External factors (economic conditions, competition)


🧠 Tip: Ensure data is clean and complete before analysis to avoid skewed results.

📌 Step 3: Analyze the Data

Now, dive into the data and perform the following tasks:

1. Data Exploration: Look for patterns, trends, and anomalies.


2. Hypothesis Testing: Identify possible causes of the problem (e.g., "Are promotions leading to an increase in sales?").


3. Segmentation Analysis: Break down the data by regions, products, customer types, etc. to identify key insights.



🧠 Example:
Use SQL to extract sales data by region and calculate monthly growth:

SELECT Region, SUM(Sales) AS Total_Sales, AVG(Sales) AS Avg_Sales
FROM Sales
GROUP BY Region;


📌 Step 4: Visualize the Insights

Once you've analyzed the data, create visualizations to make the insights clear and actionable:

💹 Use line charts for trends over time.

📊 Use bar charts to compare different segments (regions, products, etc.).

🗺 Use heatmaps for geographical analysis.


💡 Tip: Keep your visualizations simple and focused on the key insights.


📌 Step 5: Provide Recommendations

Finally, based on your analysis, provide actionable recommendations to the business.

For example: “Focus promotions on Region X, where sales are consistently lower than other regions.”

“Increase marketing spend for the high-performing products.”

Free Resources for business analysts
👇👇

https://news.1rj.ru/str/analystcommunity

Share with credits: https://news.1rj.ru/str/sqlspecialist

Hope it helps :)
👍179
Data Analytics
SQL Interview Questions with detailed answers: 2️⃣ How does GROUP BY work, and why do we use it? GROUP BY is used to arrange identical data into groups, often for performing aggregation functions (like COUNT, SUM, AVG, etc.) on each group. It's typically…
SQL Interview Questions with detailed answers:

3️⃣ What is the difference between HAVING and WHERE?

WHERE: It is used to filter records before any grouping occurs. It operates on individual rows in the table.

HAVING: It is used to filter records after the grouping operation. It works on aggregated data (e.g., data created using GROUP BY).

Example:

-- Using WHERE to filter rows before grouping 
SELECT department_id, AVG(salary) AS avg_salary FROM employees WHERE salary > 50000 GROUP BY department_id;

-- Using HAVING to filter groups after aggregation
SELECT department_id, AVG(salary) AS avg_salary FROM employees GROUP BY department_id HAVING AVG(salary) > 60000;


Explanation:

WHERE filters rows where the salary is greater than 50,000 before grouping by department.
HAVING filters departments where the average salary is greater than 60,000 after grouping.

Key difference:
WHERE filters individual rows.
HAVING filters groups after aggregation.

Like this post if you want me to continue this SQL Interview Series♥️

Share with credits: https://news.1rj.ru/str/sqlspecialist

Hope it helps :)
👍1610
Which of the following is not a Python Library?
Anonymous Quiz
5%
Pandas
2%
Numpy
6%
Matplotlib
87%
Tableau
👍121👏1
Which of the following is SQL Command is used to sort results?
Anonymous Quiz
34%
SORT BY
57%
ORDER BY
7%
SORTED
3%
ORDER ON
👍181
Data Analytics
Which of the following is SQL Command is used to sort results?
Guys, please check out my SQL tutorial if you're getting this wrong! 👇
https://news.1rj.ru/str/sqlspecialist/567

For the next few days, I'll be posting basic data analytics questions to ensure all my subscribers understand the essential concepts. Once I see 80%+ correct answers, we'll move on to more advanced polls and quizzes!

Hope you all succeed one day :)
👍179
Data Analytics
SQL Interview Questions with detailed answers: 3️⃣ What is the difference between HAVING and WHERE? WHERE: It is used to filter records before any grouping occurs. It operates on individual rows in the table. HAVING: It is used to filter records after…
SQL Interview Questions with detailed answers:

4️⃣ How do you remove duplicate rows from a table?

To remove duplicate rows, you can use the DISTINCT keyword in a SELECT query.

Example:

SELECT DISTINCT column_name FROM table_name; 


Explanation:
DISTINCT will return only unique rows for the specified column(s). It compares all columns in the query and removes duplicates.

For example, if you have a table of employees and some rows are repeated, using DISTINCT will only return unique employees.

Example with multiple columns:

SELECT DISTINCT first_name, last_name FROM employees; 


This will return only unique combinations of first and last names.

Top 20 SQL Interview Questions

Like this post if you want me to continue this SQL Interview Series♥️

Share with credits: https://news.1rj.ru/str/sqlspecialist

Hope it helps :)
👍1810
Which of the following loop is not available in Python?
Anonymous Quiz
6%
While loop
85%
Do while loop
10%
For loop
👌52👍1🥰1
Data Analytics
SQL Interview Questions with detailed answers: 4️⃣ How do you remove duplicate rows from a table? To remove duplicate rows, you can use the DISTINCT keyword in a SELECT query. Example: SELECT DISTINCT column_name FROM table_name; Explanation: DISTINCT…
SQL Interview Questions with detailed answers:

5️⃣ Difference between RANK(), DENSE_RANK(), and ROW_NUMBER()

1️⃣ RANK() assigns a rank to each row based on the specified order. If two rows have the same value, they get the same rank, but the next rank is skipped.
Example: If two employees have the same salary and rank as 2, the next rank will be 4 (skipping 3).

SELECT employee_id, salary, 
RANK() OVER (ORDER BY salary DESC) AS rank
FROM employees;


2️⃣ DENSE_RANK() is similar to RANK(), but it does not skip ranks when there are ties.
Example: If two employees share rank 2, the next rank will be 3 instead of skipping it.

SELECT employee_id, salary, 
DENSE_RANK() OVER (ORDER BY salary DESC) AS dense_rank
FROM employees;


3️⃣ ROW_NUMBER() assigns a unique number to each row, even if the values are the same. No ties occur, and every row gets a unique sequential number.

SELECT employee_id, salary, 
ROW_NUMBER() OVER (ORDER BY salary DESC) AS row_num
FROM employees;


⬇️ Key Differences:

RANK() skips numbers when there are duplicates.

DENSE_RANK() does not skip numbers and assigns the next rank sequentially.

ROW_NUMBER() does not allow ties and gives every row a unique number.

Top 20 SQL Interview Questions

Like this post if you want me to continue this SQL Interview Series♥️

Share with credits: https://news.1rj.ru/str/sqlspecialist

Hope it helps :)
👍1711👏2🥰1🎉1
Which of the following is not a window function?
Anonymous Quiz
4%
RANK()
15%
DENSE_RANK()
25%
LEAD()
48%
SORT()
9%
ROW_NUMBER()
👍95
Data Analytics
Which of the following is not a window function?
Here is the list of most widely used window functions in SQL:

ROW_NUMBER(): Assigns consecutive numbers starting from 1 to all rows in the table
RANK: Assigns a rank value to each row within each ordered partition of a result set
NTILE(): Returns the group number for each of the rows in the partition
LEAD() and LAG(): Compares the rows with their previous or next rows
PERCENTILE_CONT: Compares each employee's salary with the average salary in his or her department

And SORT() is not even a valid command in SQL. For sorting, we use ORDER BY clause in SQL.

Hope it helps :)
👍245
Data Analytics
SQL Interview Questions with detailed answers: 5️⃣ Difference between RANK(), DENSE_RANK(), and ROW_NUMBER() 1️⃣ RANK() assigns a rank to each row based on the specified order. If two rows have the same value, they get the same rank, but the next rank is…
SQL Interview Questions with detailed answers:

6️⃣ How do you find the second highest salary from an Employee table?

There are multiple ways to find the second highest salary in SQL. Here are three common approaches:

1️⃣ Using LIMIT and OFFSET (MySQL, PostgreSQL, etc.)

SELECT DISTINCT salary FROM employees ORDER BY salary DESC LIMIT 1 OFFSET 1; 


Explanation:
ORDER BY salary DESC sorts salaries in descending order.
LIMIT 1 OFFSET 1 skips the highest salary (OFFSET 1) and retrieves the next highest.


2️⃣ Using RANK() (Works in SQL Server, PostgreSQL, MySQL 8+)

SELECT salary FROM ( SELECT salary, RANK() OVER (ORDER BY salary DESC) AS rnk FROM employees ) ranked_salaries WHERE rnk = 2; 


Explanation:
The inner query assigns a RANK() to each salary.
The outer query filters for rnk = 2 to get the second highest salary.


3️⃣ Using MAX() and NOT IN (Works in all SQL versions)

SELECT MAX(salary) FROM employees WHERE salary NOT IN (SELECT MAX(salary) FROM employees); 


Explanation:
The subquery finds the highest salary.
The main query finds the maximum salary excluding the highest one.
Each approach depends on the database system you are using.

Top 20 SQL Interview Questions

Like this post if you want me to continue this SQL Interview Series♥️

Share with credits: https://news.1rj.ru/str/sqlspecialist

Hope it helps :)
👍1811
Which of the following join is not available in SQL?
Anonymous Quiz
4%
INNER JOIN
20%
CROSS JOIN
57%
UPPER JOIN
19%
SELF JOIN
👍2
Data Analytics
SQL Interview Questions with detailed answers: 6️⃣ How do you find the second highest salary from an Employee table? There are multiple ways to find the second highest salary in SQL. Here are three common approaches: 1️⃣ Using LIMIT and OFFSET (MySQL,…
SQL Interview Questions with detailed answers:

7️⃣ What is a Common Table Expression (CTE), and when should you use it?

A Common Table Expression (CTE) is a temporary result set that can be referenced within a SELECT, INSERT, UPDATE, or DELETE statement. It improves code readability and allows recursive queries.

Syntax of a CTE

WITH cte_name AS ( SELECT column1, column2 FROM table_name WHERE condition ) SELECT * FROM cte_name; 


Example: Using CTE to Find Employees with High Salaries

WITH HighSalaryEmployees AS ( SELECT employee_id, first_name, salary FROM employees WHERE salary > 70000 ) SELECT * FROM HighSalaryEmployees; 


When to Use CTEs?

1️⃣ Improve Readability – Makes complex queries easier to understand.
2️⃣ Avoid Subquery Repetition – Instead of repeating subqueries, define them once in a CTE.
3️⃣ Enable Recursion – Useful for hierarchical data like employee-manager relationships.

Top 20 SQL Interview Questions

Like this post if you want me to continue this SQL Interview Series♥️

Share with credits: https://news.1rj.ru/str/sqlspecialist

Hope it helps :)
👍2117👌1