Data Analytics – Telegram
Data Analytics
108K subscribers
131 photos
2 files
802 links
Perfect channel to learn Data Analytics

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

For Promotions: @coderfun @love_data
Download Telegram
Top 50 Tableau Interview Questions (2025)

1. What is Tableau?
2. Explain the key components of Tableau.
3. Differentiate between Tableau Desktop, Tableau Server, and Tableau Online.
4. What are the different types of data connections in Tableau?
5. Explain the data extraction process in Tableau.
6. What is Tableau Prep Builder?
7. How do you clean and transform data in Tableau Prep?
8. What are the different data transformations available in Tableau Prep?
9. Explain the concept of data blending in Tableau.
10. What is data joining in Tableau?
11. What are the different types of joins in Tableau?
12. What is a calculated field in Tableau?
13. What are the different types of calculations in Tableau?
14. Explain LOD expressions (Level of Detail).
15. What are the different types of LOD expressions?
16. What is a parameter in Tableau?
17. How do you use parameters in Tableau?
18. What are sets in Tableau?
19. How do you use sets in Tableau?
20. What are groups in Tableau?
21. How do you create interactive dashboards in Tableau?
22. What are filters in Tableau?
23. Explain the different types of filters in Tableau.
24. How do you create a hierarchy in Tableau?
25. What are stories in Tableau?
26. What is Tableau Server?
27. How do you publish workbooks to Tableau Server?
28. How do you manage user permissions in Tableau Server?
29. What is Tableau Online?
30. Explain the advantages of using Tableau.
31. What are the limitations of Tableau?
32. How do you optimize Tableau dashboards for performance?
33. What are best practices for data visualization in Tableau?
34. What is the difference between discrete and continuous data?
35. What are dimensions and measures in Tableau?
36. Explain the use of table calculations in Tableau.
37. How do you create a map in Tableau?
38. How do you use custom geocoding in Tableau?
39. What is the difference between a live connection and an extract?
40. When should you use a live connection vs. an extract?
41. What are the different file types in Tableau (.twb, .twbx, .tds)?
42. How do you embed a Tableau dashboard into a web page?
43. What is the difference between Tableau Public and Tableau Desktop?
44. What are extensions in Tableau?
45. How do you handle large datasets in Tableau?
46. Explain the use of context filters.
47. What are data source filters?
48. What are the latest features of Tableau?
49. How do you use Tableau with cloud data sources?
50. How do you troubleshoot common Tableau errors?

Tableau Resources: https://whatsapp.com/channel/0029VasYW1V5kg6z4EHOHG1t

Double tap ❤️ for detailed answers!
Please open Telegram to view this post
VIEW IN TELEGRAM
16👍1👏1
How to Become a Data Analyst from Scratch! 🚀

Whether you're starting fresh or upskilling, here's your roadmap:

➜ Master Excel and SQL - solve SQL problems from leetcode & hackerank
➜ Get the hang of either Power BI or Tableau - do some hands-on projects
➜ learn what the heck ATS is and how to get around it
➜ learn to be ready for any interview question
➜ Build projects for a data portfolio
➜ And you don't need to do it all at once!
➜ Fail and learn to pick yourself up whenever required

Whether it's acing interviews or building an impressive portfolio, give yourself the space to learn, fail, and grow. Good things take time

Like if it helps ❤️

I have curated best 80+ top-notch Data Analytics Resources 👇👇
https://topmate.io/analyst/861634

Hope it helps :)
29👏2👍1🥰1
Tableau Interview Questions with Answers Part-1 📊

1. What is Tableau? 
   Tableau is a powerful data visualization and business intelligence tool that helps turn raw data into interactive, shareable dashboards and reports for insightful decision-making.

2. Explain the key components of Tableau. 
   Main components include Tableau Desktop (for report creation), Tableau Server (on-prem sharing platform), Tableau Online (cloud version), Tableau Prep (data preparation), and Tableau Public (free version).

3. Differentiate between Tableau Desktop, Tableau Server, and Tableau Online.
⦁ Desktop: Build visualizations and reports locally.
⦁ Server: Host and share reports within your organization on-premise.
⦁ Online: Cloud-hosted Tableau Server for easy access and sharing without infrastructure setup.

4. What are the different types of data connections in Tableau? 
   Tableau supports live connections and data extracts from multiple sources like Excel, SQL databases, cloud sources (AWS, Google BigQuery), and web data connectors.

5. Explain the data extraction process in Tableau. 
   Data extracts are snapshots of data optimized for fast performance. You can create extracts to work offline, improve speed, and schedule refreshes to keep data current.

6. What is Tableau Prep Builder? 
   Tableau Prep Builder is a tool used to clean, combine, transform, and prepare data before analysis and visualization in Tableau.

7. How do you clean and transform data in Tableau Prep? 
   By applying steps like filtering, grouping, pivoting, splitting columns, replacing values, and aggregating data to create a clean and structured dataset.

8. What are the different data transformations available in Tableau Prep? 
   Includes filtering rows, pivot/unpivot, creating calculated fields, splitting and merging fields, aggregating data, and data type changes.

9. Explain the concept of data blending in Tableau. 
   Data blending combines data from different sources on a common field without physically joining them, useful when tables come from different databases or systems.

10. What is data joining in Tableau? 
    Joining physically combines tables from the same data source based on related columns (keys), allowing you to analyze combined data within Tableau.

Double Tap ♥️ For Part-2 😊
Please open Telegram to view this post
VIEW IN TELEGRAM
24🥰2👍1👏1
Tableau Interview Questions with Answers Part-2 📊

11. What are the different types of joins in Tableau?
Tableau supports Inner Join, Left Join, Right Join, and Full Outer Join to combine tables based on matching keys from the same data source.

12. What is a calculated field in Tableau?
A calculated field lets you create a new field in your data by defining a formula or expression using existing fields, allowing custom metrics or dimensions.

13. What are the different types of calculations in Tableau?
⦁ Row-level calculations (per row)
⦁ Aggregate calculations (summaries)
⦁ Table calculations (computed on the result set, e.g., running total)
⦁ Level of Detail (LOD) calculations – fixed, include, exclude

14. Explain LOD expressions (Level of Detail).
LOD expressions allow you to compute aggregations at different granularities than the view, giving precise control on the level at which data is aggregated.

15. What are the different types of LOD expressions?
⦁ FIXED: Calculation fixed to specified dimensions
⦁ INCLUDE: Adds dimensions to the view granularity
⦁ EXCLUDE: Removes dimensions from the view granularity

16. What is a parameter in Tableau?
A parameter is a dynamic value that users can input or select to modify calculations, filters, or reference lines interactively in dashboards.

17. How do you use parameters in Tableau?
They can be used to swap measures/dimensions, control filter thresholds, change calculated field inputs, or drive conditional formatting dynamically.

18. What are sets in Tableau?
Sets are custom fields grouping data based on conditions or manual selections, used for comparative analysis or filtering.

19. How do you use sets in Tableau?
You can create dynamic sets based on conditions or logic, then use them as filters, in calculated fields, or to build comparative visuals.

20. What are groups in Tableau?
Groups combine multiple dimension members into a single bucket to simplify analysis, such as grouping several product categories together.

Double Tap ♥️ For Part-3 😊
Please open Telegram to view this post
VIEW IN TELEGRAM
17👍2🥰2👏2
Tableau Interview Questions with Answers Part-3 📊

21. How do you create interactive dashboards in Tableau? 
    By combining multiple worksheets into a single dashboard, using filters, parameters, actions (like highlight, filter, URL), and arranging visual elements for user-friendly interactivity.

22. What are filters in Tableau? 
    Filters enable restricting the data shown in a view by applying conditions to measures or dimensions, improving focus and performance.

23. Explain the different types of filters in Tableau.
⦁ Extract filters
⦁ Data source filters
⦁ Context filters
⦁ Dimension filters
⦁ Measure filters
⦁ Table calculation filters

24. How do you create a hierarchy in Tableau? 
    Drag and drop dimensions onto each other in the data pane to build hierarchical drill-down paths (e.g., Country > State > City).

25. What are stories in Tableau? 
    Stories are a sequence of dashboards or sheets presented in a narrative flow to tell data-driven insights step-by-step.

26. What is Tableau Server? 
    An on-premises platform where users can publish, share, and manage Tableau reports and dashboards securely across the organization.

27. How do you publish workbooks to Tableau Server? 
    From Tableau Desktop, use the ‘Server > Publish Workbook’ option, choose the target project and set permissions, then publish.

28. How do you manage user permissions in Tableau Server? 
    Via user roles and group permissions that control content access, editing, and sharing rights within projects and sites.

29. What is Tableau Online? 
    A cloud-hosted Tableau Server alternative that provides similar sharing and collaboration capabilities without on-prem setup.

30. Explain the advantages of using Tableau. 
    Fast, interactive visual analysis; ease of use; rich data connectivity; powerful dashboard creation; seamless sharing; and strong community support.

Double Tap ♥️ For Part-4 😊
Please open Telegram to view this post
VIEW IN TELEGRAM
16👏2👍1
Tableau Interview Questions with Answers Part-4 📊

31. What are the limitations of Tableau? 
    It can be costly for large deployments, has limited advanced statistical analysis compared to tools like R, struggles with very large datasets in live mode, and has a learning curve for complex calculations.

32. How do you optimize Tableau dashboards for performance? 
    Use extracts instead of live connections, limit filters and quick filters, minimize the number of marks and calculations, use context filters wisely, and optimize data sources by removing unnecessary columns.

33. What are best practices for data visualization in Tableau? 
    Keep visuals simple, choose appropriate chart types, use consistent colors, avoid clutter, use filters to focus on important data, and ensure dashboard interactivity for user exploration.

34. What is the difference between discrete and continuous data? 
    Discrete data represents distinct, separate values (blue pills) like categories; continuous data represents a range of values (green pills) like sales numbers that can be measured continuously.

35. What are dimensions and measures in Tableau? 
    Dimensions are categorical fields used to slice data (e.g., region, product), and measures are numeric fields you aggregate for analysis (e.g., sales, profit).

36. Explain the use of table calculations in Tableau. 
    Table calculations are computations applied to the data in the view, such as running totals, percent of total, moving averages, which are computed after aggregation.

37. How do you create a map in Tableau? 
    Connect to geographical data (like country, state, zip code), drag geographic fields into rows/columns, and Tableau automatically generates map visualizations.

38. How do you use custom geocoding in Tableau? 
    You can import your own latitude and longitude data to map custom locations or modify Tableau's geographic roles for new areas not in default data.

39. What is the difference between a live connection and an extract? 
    Live connection queries the data source directly in real-time; extract is a snapshot of data saved locally for faster performance and offline use.

40. When should you use a live connection vs. an extract? 
    Use live when data must be current and updated in real-time; use extracts when needing faster performance or working offline.

Double Tap ♥️ For Part-5 😊
Please open Telegram to view this post
VIEW IN TELEGRAM
15👍1🥰1👏1
Tableau Interview Questions with Answers Part-5 📊

41. What are the different file types in Tableau (.twb,.twbx,.tds)?
⦁ .twb — Tableau Workbook (XML containing viz instructions, no data)
⦁ .twbx — Packaged Workbook (twb + data + images compressed)
⦁ .tds — Tableau Data Source (metadata about connections and calculations, no data)

42. How do you embed a Tableau dashboard into a web page?
You can generate an embed code (iframe) from Tableau Server/Online or Tableau Public and insert it into your web page’s HTML for seamless embedding.

43. What is the difference between Tableau Public and Tableau Desktop?
Tableau Desktop is the full-featured paid software for building dashboards privately; Tableau Public is a free version where workbooks and data are stored publicly.

44. What are extensions in Tableau?
Extensions are add-ons that enhance Tableau dashboards with custom features, such as input forms or integration with other applications, available via Tableau Extension Gallery.

45. How do you handle large datasets in Tableau?
Use extracts, aggregates, filters, context filters, minimize marks, optimize data sources, and leverage Tableau’s Hyper engine for better performance.

46. Explain the use of context filters.
Context filters create a temporary subset of data that other filters depend on, improving performance with large data sets and enabling dependent filtering.

47. What are data source filters?
Filters applied at the data source level to restrict the data available for all users and workbooks using that source.

48. What are the latest features of Tableau?
Features like improved AI-powered Ask Data, dynamic parameters, accelerated data prep with Tableau Prep improvements, and better data governance and collaboration tools (2025 updates).

49. How do you use Tableau with cloud data sources?
Connect directly to cloud databases (AWS Redshift, Snowflake, Google BigQuery, Azure SQL), use live connections or extracts, and leverage Tableau’s native cloud integrations.

50. How do you troubleshoot common Tableau errors?
Check data source connectivity, review calculated fields for syntax errors, verify filters and actions, optimize performance, and consult Tableau logs for detailed error info.

Double Tap ♥️ For more 😊
13👏2👍1
8-Week Beginner Roadmap to Learn Data Analysis 📊

🗓️ Week 1: Excel & Data Basics 
Goal: Master data organization and analysis basics 
Topics: Excel formulas, functions, PivotTables, data cleaning 
Tools: Microsoft Excel, Google Sheets 
Mini Project: Analyze sales or survey data with PivotTables

🗓️ Week 2: SQL Fundamentals 
Goal: Learn to query databases efficiently 
Topics: SELECT, WHERE, JOIN, GROUP BY, subqueries 
Tools: MySQL, PostgreSQL, SQLite 
Mini Project: Query sample customer or sales database

🗓️ Week 3: Data Visualization Basics 
Goal: Create meaningful charts and graphs 
Topics: Bar charts, line charts, scatter plots, dashboards 
Tools: Tableau, Power BI, Excel charts 
Mini Project: Build dashboard to analyze sales trends

🗓️ Week 4: Data Cleaning & Preparation 
Goal: Handle messy data for analysis 
Topics: Handling missing values, duplicates, data types 
Tools: Excel, Python (Pandas) basics 
Mini Project: Clean and prepare real-world dataset for analysis

🗓️ Week 5: Statistics for Data Analysis 
Goal: Understand key statistical concepts 
Topics: Denoscriptive stats, distributions, correlation, hypothesis testing 
Tools: Excel, Python (SciPy, NumPy) 
Mini Project: Analyze survey data & draw insights

🗓️ Week 6: Advanced SQL & Database Concepts 
Goal: Optimize queries & explore database design basics 
Topics: Window functions, indexes, normalization 
Tools: SQL Server, MySQL 
Mini Project: Complex query for sales and customer analysis

🗓️ Week 7: Automating Analysis with Python 
Goal: Use Python for repetitive data tasks 
Topics: Pandas automation, data aggregation, visualization noscripting 
Tools: Jupyter Notebook, Pandas, Matplotlib 
Mini Project: Automate monthly sales report generation

🗓️ Week 8: Capstone Project + Reporting 
Goal: End-to-end analysis and presentation 
Project Ideas: Customer segmentation, sales forecasting, churn analysis 
Tools: Tableau/Power BI for visualization + Python/SQL for backend 
Bonus: Present findings in a polished report or dashboard

💡 Tips:
⦁  Practice querying and analysis on public datasets (Kaggle, data.gov)
⦁  Join data challenges and community projects

💬 Tap ❤️ for the detailed explanation of each topic!
Please open Telegram to view this post
VIEW IN TELEGRAM
85👏4🥰2
SQL Checklist for Data Analysts 📀🧠

1. SQL Basics
⦁ SELECT, WHERE, ORDER BY
⦁ DISTINCT, LIMIT, BETWEEN, IN
⦁ Aliasing (AS)

2. Filtering & Aggregation
⦁ GROUP BY & HAVING
⦁ COUNT(), SUM(), AVG(), MIN(), MAX()
⦁ NULL handling with COALESCE, IS NULL

3. Joins
⦁ INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL OUTER JOIN
⦁ Joining multiple tables
⦁ Self Joins

4. Subqueries & CTEs
⦁ Subqueries in SELECT, WHERE, FROM
⦁ WITH clause (Common Table Expressions)
⦁ Nested subqueries

5. Window Functions
⦁ ROW_NUMBER(), RANK(), DENSE_RANK()
⦁ LEAD(), LAG()
⦁ PARTITION BY & ORDER BY within OVER()

6. Data Manipulation
⦁ INSERT, UPDATE, DELETE
⦁ CREATE TABLE, ALTER TABLE
⦁ Constraints: PRIMARY KEY, FOREIGN KEY, NOT NULL

7. Optimization Techniques
⦁ Indexes
⦁ Query performance tips
⦁ EXPLAIN plans

8. Real-World Scenarios
⦁ Writing complex queries for reports
⦁ Customer, sales, and product data
⦁ Time-based analysis (e.g., monthly trends)

9. Tools & Practice Platforms
⦁ MySQL, PostgreSQL, SQL Server
⦁ DB Fiddle, Mode Analytics, LeetCode (SQL), StrataScratch

10. Portfolio & Projects
⦁ Showcase queries on GitHub
⦁ Analyze public datasets (e.g., ecommerce, finance)
⦁ Document business insights

SQL Resources: https://whatsapp.com/channel/0029VanC5rODzgT6TiTGoa1v

💡 Double Tap ♥️ For More
Please open Telegram to view this post
VIEW IN TELEGRAM
20👍2🥰1👏1
10 Most Useful SQL Interview Queries (with Examples) 💼

1️⃣ Find the second highest salary:
SELECT MAX(salary)  
FROM employees 
WHERE salary < (SELECT MAX(salary) FROM employees);


2️⃣ Count employees in each department:
SELECT department, COUNT(*)  
FROM employees 
GROUP BY department;


3️⃣ Fetch duplicate emails:
SELECT email, COUNT(*)  
FROM users 
GROUP BY email 
HAVING COUNT(*) > 1;


4️⃣ Join orders with customer names:
SELECT c.name, o.order_date  
FROM customers c 
JOIN orders o ON c.id = o.customer_id;


5️⃣ Get top 3 highest salaries:
SELECT DISTINCT salary  
FROM employees 
ORDER BY salary DESC 
LIMIT 3;


6️⃣ Retrieve latest 5 logins:
SELECT * FROM logins  
ORDER BY login_time DESC 
LIMIT 5;


7️⃣ Employees with no manager:
SELECT name  
FROM employees 
WHERE manager_id IS NULL;


8️⃣ Search names starting with ‘S’:
SELECT * FROM employees  
WHERE name LIKE 'S%';


9️⃣ Total sales per month:
SELECT MONTH(order_date) AS month, SUM(amount)  
FROM sales 
GROUP BY MONTH(order_date);


🔟 Delete inactive users:
DELETE FROM users  
WHERE last_active < '2023-01-01';


Tip: Master subqueries, joins, groupings & filters – they show up in nearly every interview!

💬 Tap ❤️ for more!
Please open Telegram to view this post
VIEW IN TELEGRAM
22👍2👏2🥰1
Python Checklist for Data Analysts 🧠

1. Python Basics 
   Variables, data types (int, float, str, bool) 
   Control flow: if-else, loops (for, while) 
   Functions and lambda expressions 
   List, dict, tuple, set basics

2. Data Handling & Manipulation 
   NumPy: arrays, vectorized operations, broadcasting 
   Pandas: Series & DataFrame, reading/writing CSV, Excel 
   Data inspection: head(), info(), describe() 
   Filtering, sorting, grouping (groupby), merging/joining datasets 
   Handling missing data (isnull(), fillna(), dropna())

3. Data Visualization 
   Matplotlib basics: plots, histograms, scatter plots 
   Seaborn: statistical visualizations (heatmaps, boxplots) 
   Plotly (optional): interactive charts

4. Statistics & Probability 
   Denoscriptive stats (mean, median, std) 
   Probability distributions, hypothesis testing (SciPy, statsmodels) 
   Correlation, covariance

5. Working with APIs & Data Sources 
   Fetching data via APIs (requests library) 
   Reading JSON, XML 
   Web scraping basics (BeautifulSoup, Scrapy)

6. Automation & Scripting 
   Automate repetitive data tasks using loops, functions 
   Excel automation (openpyxl, xlrd
   File handling and regular expressions

7. Machine Learning Basics (Optional starting point) 
   Scikit-learn for basic models (regression, classification) 
   Train-test split, evaluation metrics

8. Version Control & Collaboration 
   Git basics: init, commit, push, pull 
   Sharing notebooks or noscripts via GitHub

9. Environment & Tools 
   Jupyter Notebook / JupyterLab for interactive analysis 
   Python IDEs (VSCode, PyCharm) 
   Virtual environments (venv, conda)

10. Projects & Portfolio 
    Analyze real datasets (Kaggle, UCI) 
    Document insights in notebooks or blogs 
    Showcase code & analysis on GitHub

💡 Tips:
⦁ Practice coding daily with mini-projects and challenges
⦁ Use interactive platforms like Kaggle, DataCamp, or LeetCode (Python)
⦁ Combine SQL + Python skills for powerful data querying & analysis

Python Programming Resources: https://whatsapp.com/channel/0029VaiM08SDuMRaGKd9Wv0L

Double Tap ♥️ For More
Please open Telegram to view this post
VIEW IN TELEGRAM
16👍4👏3🥰1
Excel Checklist for Data Analysts 📀🧠

1️⃣ Excel Basics 
Formulas & Functions (SUM, IF, VLOOKUP, INDEX-MATCH) 
Cell references: Relative, Absolute & Mixed 
Data types & formatting

2️⃣ Data Manipulation 
Sorting & Filtering data 
Remove duplicates & data validation 
Conditional formatting for insights

3️⃣ Pivot Tables & Charts 
Create & customize Pivot Tables for summaries 
Use slicers & filters in Pivot Tables 
Build charts: Bar, Line, Pie, Histograms

4️⃣ Advanced Formulas 
Nested IF, COUNTIF, SUMIF, AND/OR logic 
Text functions: LEFT, RIGHT, MID, CONCATENATE 
Date & Time functions

5️⃣ Data Cleaning 
Handling blanks/missing values 
TRIM, CLEAN functions to fix data 
Find & replace, Flash fill

6️⃣ Automation 
Macros & VBA basics (record & edit) 
Use formula-driven automation 
Dynamic named ranges for flexibility

7️⃣ Collaboration & Sharing 
Protect sheets & workbooks 
Track changes & comments 
Export data for reporting

8️⃣ Data Analysis Tools 
What-if analysis, Goal Seek, Solver 
Data Tables and Scenario Manager 
Power Query basics (optional)

9️⃣ Dashboard Basics 
Combine Pivot Tables & Charts 
Use form controls & slicers 
Design interactive, user-friendly dashboards

🔟 Practice & Projects 
Analyze sample datasets (sales, finance) 
Automate monthly reporting tasks 
Build a portfolio with Excel files & dashboards

💡 Tips:
⦁ Practice with real datasets to apply functions & Pivot Tables
⦁ Learn shortcuts to boost speed
⦁ Combine Excel skills with Python & SQL for powerful analysis

Excel Learning Resources: 
https://whatsapp.com/channel/0029VaifY548qIzv0u1AHz3i

Double Tap ♥️ For More
Please open Telegram to view this post
VIEW IN TELEGRAM
8👏3👍1
Top 10 SQL interview questions with solutions by @sqlspecialist

1. What is the difference between WHERE and HAVING?

Solution:

WHERE filters rows before aggregation.

HAVING filters rows after aggregation.

SELECT department, AVG(salary)
FROM employees
WHERE salary > 3000
GROUP BY department
HAVING AVG(salary) > 5000;


2. Write a query to find the second-highest salary.

Solution:

SELECT MAX(salary) AS second_highest_salary
FROM employees
WHERE salary < (SELECT MAX(salary) FROM employees);



3. How do you fetch the first 5 rows of a table?

Solution:

SELECT * FROM employees
LIMIT 5; -- (MySQL/PostgreSQL)

For SQL Server:

SELECT TOP 5 * FROM employees;



4. Write a query to find duplicate records in a table.

Solution:

SELECT column1, column2, COUNT(*)
FROM table_name
GROUP BY column1, column2
HAVING COUNT(*) > 1;



5. How do you find employees who don’t belong to any department?

Solution:

SELECT * 
FROM employees
WHERE department_id IS NULL;


6. What is a JOIN, and write a query to fetch data using INNER JOIN.

Solution:
A JOIN combines rows from two or more tables based on a related column.

SELECT e.name, d.department_name
FROM employees e
INNER JOIN departments d ON e.department_id = d.id;


7. Write a query to find the total number of employees in each department.

Solution:

SELECT department_id, COUNT(*) AS total_employees
FROM employees
GROUP BY department_id;


8. How do you fetch the current date in SQL?

Solution:

SELECT CURRENT_DATE; -- MySQL/PostgreSQL
SELECT GETDATE(); -- SQL Server


9. Write a query to delete duplicate rows but keep one.

Solution:

WITH CTE AS (
SELECT *, ROW_NUMBER() OVER (PARTITION BY column1, column2 ORDER BY id) AS rn
FROM table_name
)
DELETE FROM CTE WHERE rn > 1;


10. What is a Common Table Expression (CTE), and how do you use it?

Solution:
A CTE is a temporary result set defined within a query.

WITH EmployeeCTE AS (
SELECT department_id, COUNT(*) AS total_employees
FROM employees
GROUP BY department_id
)
SELECT * FROM EmployeeCTE WHERE total_employees > 10;



Hope it helps :)

#sql #dataanalysts
20
Top 10 Python Interview Questions with Solutions

1️⃣ What is the difference between a list and a tuple?
⦁ List: mutable, defined with []
⦁ Tuple: immutable, defined with ()
lst = [1, 2, 3]
tpl = (1, 2, 3)


2️⃣ How to reverse a string in Python?
s = "Hello"
rev = s[::-1]  # 'olleH'


3️⃣ Write a function to find factorial using recursion.
def factorial(n):
    return 1 if n == 0 else n * factorial(n-1)


4️⃣ How do you handle exceptions?
⦁ Use try and except blocks.
try:
    x = 1 / 0
except ZeroDivisionError:
    print("Cannot divide by zero")


5️⃣ Difference between == and is?
== compares values
is compares identities (memory locations)

6️⃣ How to check if a number is prime?
def is_prime(n):
    if n < 2:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True


7️⃣ What are list comprehensions? Give example.
⦁ Compact way to create lists
squares = [x*x for x in range(5)]


8️⃣ How to merge two dictionaries?
⦁ Python 3.9+
d1 = {'a':1}
d2 = {'b':2}
merged = d1 | d2


9️⃣ Explain *args and **kwargs.
*args: variable number of positional arguments
**kwargs: variable number of keyword arguments

10️⃣ How do you read a file in Python?
with open('file.txt', 'r') as f:
    data = f.read()


Python Interview Resources: https://whatsapp.com/channel/0029VaiM08SDuMRaGKd9Wv0L

Tap ❤️ for more
Please open Telegram to view this post
VIEW IN TELEGRAM
7👍2👏1
Top 10 SQL Interview Questions

1️⃣ What is SQL and its types? 
SQL (Structured Query Language) is used to manage and manipulate databases. 
Types: DDL, DML, DCL, TCL 
Example: CREATE, SELECT, GRANT, COMMIT

2️⃣ Explain SQL constraints. 
Constraints ensure data integrity:
⦁ PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, CHECK

3️⃣ What is normalization? 
It's organizing data to reduce redundancy and improve integrity (1NF, 2NF, 3NF…).

4️⃣ Explain different types of JOINs with example.
⦁ INNER JOIN: Returns matching rows
⦁ LEFT JOIN: All from left + matching right rows
⦁ RIGHT JOIN: All from right + matching left rows
⦁ FULL JOIN: All rows from both tables

5️⃣ What is a subquery? Give example. 
A query inside another query:
SELECT name FROM employees
WHERE department_id = (SELECT id FROM departments WHERE name='Sales');


6️⃣ How to optimize slow queries? 
Use indexes, avoid SELECT *, use joins wisely, reduce nested queries.

7️⃣ What are aggregate functions? List examples. 
Functions that perform a calculation on a set of values: 
SUM(), COUNT(), AVG(), MIN(), MAX()

8️⃣ Explain SQL injection and prevention. 
A security vulnerability to manipulate queries. Prevent via parameterized queries, input validation.

9️⃣ How to find Nth highest salary without TOP/LIMIT?
SELECT DISTINCT salary FROM employees e1
WHERE N-1 = (SELECT COUNT(DISTINCT salary) FROM employees e2 WHERE e2.salary > e1.salary);


🔟 What is a stored procedure? 
A precompiled SQL program that can be executed to perform operations repeatedly.

🔥 React for more! ❤️
17🔥2
Top 10 SQL Interview Questions 🔥

1️⃣ What is a table and a field in SQL?
⦁ Table: Organized data in rows and columns
⦁ Field: A column representing data attribute

2️⃣ Describe the SELECT statement.
⦁ Fetch data from one or more tables
⦁ Use WHERE to filter, ORDER BY to sort

3️⃣ Explain SQL constraints.
⦁ Rules for data integrity: PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, CHECK

4️⃣ What is normalization?
⦁ Process to reduce data redundancy & improve integrity (1NF, 2NF, 3NF…)

5️⃣ Explain different JOIN types with examples.
⦁ INNER, LEFT, RIGHT, FULL JOIN: Various ways to combine tables based on matching rows

6️⃣ What is a subquery? Give example.
⦁ Query inside another query:
SELECT name FROM employees
WHERE department_id = (SELECT id FROM departments WHERE name='Sales');


7️⃣ How to optimize slow queries?
⦁ Use indexes, avoid SELECT *, simplify joins, reduce nested queries

8️⃣ What are aggregate functions? Examples?
⦁ Perform calculations on sets: SUM(), COUNT(), AVG(), MIN(), MAX()

9️⃣ What is SQL injection? How to prevent it?
⦁ Security risk manipulating queries
⦁ Prevent: parameterized queries, input validation

🔟 How to find the Nth highest salary without TOP/LIMIT?
SELECT DISTINCT salary FROM employees e1
WHERE N-1 = (SELECT COUNT(DISTINCT salary) FROM employees e2 WHERE e2.salary > e1.salary);


🔥 Double Tap ❤️ For More!
Please open Telegram to view this post
VIEW IN TELEGRAM
17👍2👏1
SQL Command Essentials: DDL, DML, DCL, TCL 🚀

DDL (Data Definition Language) 
– CREATE: Make new tables/databases 
– ALTER: Modify table structure 
– DROP: Delete tables/databases 
– TRUNCATE: Remove all data, keep structure

DML (Data Manipulation Language) 
– SELECT: Retrieve data 
– INSERT: Add data 
– UPDATE: Change data 
– DELETE: Remove data

DCL (Data Control Language) 
– GRANT: Give access rights 
– REVOKE: Remove access rights

TCL (Transaction Control Language) 
– COMMIT: Save changes 
– ROLLBACK: Undo changes 
– SAVEPOINT: Mark save point to rollback 
– BEGIN/END TRANSACTION: Start/end transactions

React ❤️ for more! 😊
26
SQL Joins Made Easy 🧠☑️

INNER JOIN 
– Returns only matching rows from both tables 
🧩 Think: Intersection 
Example:
SELECT * 
FROM orders 
INNER JOIN customers ON orders.customer_id = customers.id;


LEFT JOIN (LEFT OUTER JOIN) 
– All rows from left table + matching from right (NULL if no match) 
🔍 Think: All from Left, matching from Right 
Example:
SELECT *  
FROM customers 
LEFT JOIN orders ON customers.id = orders.customer_id;


RIGHT JOIN (RIGHT OUTER JOIN) 
– All rows from right table + matching from left (NULL if no match) 
🧭 Think: All from Right, matching from Left 
Example:
SELECT *  
FROM orders 
RIGHT JOIN customers ON orders.customer_id = customers.id;


FULL JOIN (FULL OUTER JOIN) 
– All rows from both tables, matching where possible 
🌐 Think: Union of both 
Example:
SELECT *  
FROM customers 
FULL OUTER JOIN orders ON customers.id = orders.customer_id;


CROSS JOIN 
– Cartesian product of every row in A × every row in B 
♾️ Use carefully! 
Example:
SELECT *  
FROM colors 
CROSS JOIN sizes;


SELF JOIN 
– Join a table to itself using aliases 
🔄 Useful for hierarchical data 
Example:
SELECT e1.name AS Employee, e2.name AS Manager  
FROM employees e1 
LEFT JOIN employees e2 ON e1.manager_id = e2.id;

💡 Remember: Use JOIN ON common_column to link tables correctly!

Double Tap ♥️ For More
Please open Telegram to view this post
VIEW IN TELEGRAM
18👍4👏2
Basic SQL Commands Cheat Sheet 🗃️

⦁  SELECT — Select data from database
⦁  FROM — Specify table
⦁  WHERE — Filter query by condition
⦁  AS — Rename column or table (alias)
⦁  JOIN — Combine rows from 2+ tables
⦁  AND — Combine conditions (all must match)
⦁  OR — Combine conditions (any can match)
⦁  LIMIT — Limit number of rows returned
⦁  IN — Specify multiple values in WHERE
⦁  CASE — Conditional expressions in queries
⦁  IS NULL — Select rows with NULL values
⦁  LIKE — Search patterns in columns
⦁  COMMIT — Write transaction to DB
⦁  ROLLBACK — Undo transaction block
⦁  ALTER TABLE — Add/remove columns
⦁  UPDATE — Update data in table
⦁  CREATE — Create table, DB, indexes, views
⦁  DELETE — Delete rows from table
⦁  INSERT — Add single row to table
⦁  DROP — Delete table, DB, or index
⦁  GROUP BY — Group data into logical sets
⦁  ORDER BY — Sort result (use DESC for reverse)
⦁  HAVING — Filter groups like WHERE but for grouped data
⦁  COUNT — Count number of rows
⦁  SUM — Sum values in a column
⦁  AVG — Average value in a column
⦁  MIN — Minimum value in column
⦁  MAX — Maximum value in column

💬 Tap ❤️ for more!
Please open Telegram to view this post
VIEW IN TELEGRAM
23👍6🥰2👏2👌2
Data Analytics project ideas to build your portfolio in 2025:

1. Sales Data Analysis Dashboard

Analyze sales trends, seasonal patterns, and product performance.

Use Power BI, Tableau, or Python (Dash/Plotly) for visualization.



2. Customer Segmentation

Use clustering (K-means, hierarchical) on customer data to identify groups.

Provide actionable marketing insights.



3. Social Media Sentiment Analysis

Analyze tweets or reviews using NLP to gauge public sentiment.

Visualize positive, negative, and neutral trends over time.



4. Churn Prediction Model

Analyze customer data to predict who might leave a service.

Use logistic regression, decision trees, or random forest.



5. Financial Data Analysis

Study stock prices, moving averages, and volatility.

Create an interactive dashboard with key metrics.



6. Healthcare Analytics

Analyze patient data for disease trends or hospital resource usage.

Use visualization to highlight key findings.



7. Website Traffic Analysis

Use Google Analytics data to identify user behavior patterns.

Suggest improvements for user engagement and conversion.



8. Employee Attrition Analysis

Analyze HR data to find factors leading to employee turnover.

Use statistical tests and visualization.


React ❤️ for more
21
SQL Roadmap: Step-by-Step Guide to Master SQL 🧠💻

Whether you're aiming to be a backend dev, data analyst, or full-time SQL pro — this roadmap has got you covered 👇

📍 1. SQL Basics
⦁  SELECT, FROM, WHERE
⦁  ORDER BY, LIMIT, DISTINCT 
   Learn data retrieval & filtering.

📍 2. Joins Mastery
⦁  INNER JOIN, LEFT/RIGHT/FULL OUTER JOIN
⦁  SELF JOIN, CROSS JOIN 
   Master table relationships.

📍 3. Aggregate Functions
⦁  COUNT(), SUM(), AVG(), MIN(), MAX() 
   Key for reporting & analytics.

📍 4. Grouping Data
⦁  GROUP BY to group
⦁  HAVING to filter groups 
   Example: Sales by region, top categories.

📍 5. Subqueries & Nested Queries
⦁  Use subqueries in WHERE, FROM, SELECT
⦁  Use EXISTS, IN, ANY, ALL 
   Build complex logic without extra joins.

📍 6. Data Modification
⦁  INSERT INTO, UPDATE, DELETE
⦁  MERGE (advanced) 
   Safely change dataset content.

📍 7. Database Design Concepts
⦁  Normalization (1NF to 3NF)
⦁  Primary, Foreign, Unique Keys 
   Design scalable, clean DBs.

📍 8. Indexing & Query Optimization
⦁  Speed queries with indexes
⦁  Use EXPLAIN, ANALYZE to tune 
   Vital for big data/enterprise work.

📍 9. Stored Procedures & Functions
⦁  Reusable logic, control flow (IF, CASE, LOOP) 
   Backend logic inside the DB.

📍 10. Transactions & Locks
⦁  ACID properties
⦁  BEGIN, COMMIT, ROLLBACK
⦁  Lock types (SHARED, EXCLUSIVE) 
   Prevent data corruption in concurrency.

📍 11. Views & Triggers
⦁  CREATE VIEW for abstraction
⦁  TRIGGERS auto-run SQL on events 
   Automate & maintain logic.

📍 12. Backup & Restore
⦁  Backup/restore with tools (mysqldump, pg_dump) 
   Keep your data safe.

📍 13. NoSQL Basics (Optional)
⦁  Learn MongoDB, Redis basics
⦁  Understand where SQL ends & NoSQL begins.

📍 14. Real Projects & Practice
⦁  Build projects: Employee DB, Sales Dashboard, Blogging System
⦁  Practice on LeetCode, StrataScratch, HackerRank

📍 15. Apply for SQL Dev Roles
⦁  Tailor resume with projects & optimization skills
⦁  Prepare for interviews with SQL challenges
⦁  Know common business use cases

💡 Pro Tip: Combine SQL with Python or Excel to boost your data career options.

💬 Double Tap ♥️ For More!
Please open Telegram to view this post
VIEW IN TELEGRAM
31👍1🥰1👏1