Data Science & Machine Learning
77.8K subscribers
911 photos
1 video
68 files
831 links
Join this channel to learn data science, artificial intelligence and machine learning with funny quizzes, interesting projects and amazing resources for free

For collaborations: @love_data
Download Telegram
๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ ๐—ฃ๐—ผ๐˜„๐—ฒ๐—ฟ ๐—•๐—œ ๐—ณ๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜! ๐Ÿ”ฅ

Learn Power BI through these FREE learning resources
โ€‹
โœจ What You'll Learn:
๐Ÿ“Š Interactive Dashboards
๐Ÿ“ˆ Data Visualization
๐Ÿงน Data Transformation
๐Ÿ’ผ Real-World Reporting Skills
๐ŸŽฏ Beginner-Friendly โ€” No Coding Required

๐—ฆ๐˜๐—ฎ๐—ฟ๐˜ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป๐—ถ๐—ป๐—ด ๐—ณ๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜
โ€‹
โ€‹https://pdlink.in/4hznwlu

๐Ÿ’ซPerfect for Students โ€ข Freshers โ€ข Data Analyst Aspirants โ€ข Working Professionals
โค1
๐Ÿš€๐—ฃ๐—ฎ๐˜† ๐—”๐—ณ๐˜๐—ฒ๐—ฟ ๐—ฃ๐—น๐—ฎ๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐—ง๐—ฟ๐—ฎ๐—ถ๐—ป๐—ถ๐—ป๐—ด | ๐—•๐—ฒ๐—ฐ๐—ผ๐—บ๐—ฒ ๐—ฎ ๐—™๐˜‚๐—น๐—น๐˜€๐˜๐—ฎ๐—ฐ๐—ธ ๐——๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—ฒ๐—ฟ ๐—ช๐—œ๐˜๐—ต ๐—š๐—ฒ๐—ป๐—”๐—œ

Start a high-paying tech careerโ€”even without prior coding experience

๐Ÿ† ๐—ฃ๐—น๐—ฎ๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐—›๐—ถ๐—ด๐—ต๐—น๐—ถ๐—ด๐—ต๐˜๐˜€:
๐Ÿ’ฐ โ‚น41 LPA highest salary
๐Ÿ“ˆ โ‚น7.4 LPA average salary
๐ŸŽ“ 2,000+ students placed
๐Ÿข 500+ hiring partners
โœ… 100% job assistance
๐Ÿ“œ Skill Indiaโ€“authenticated certificate

๐Ÿ”— ๐—”๐—ฝ๐—ฝ๐—น๐˜† ๐—ก๐—ผ๐˜„๐Ÿ‘‡:-

https://pdlink.in/3SuUeuD

๐ŸŽฏ HurryUp.....Limited Seats Available
โค4
๐Ÿš€ Data Science Roadmap 2026

๐Ÿ“ Phase 3: SQL for Data Science

๐Ÿ“– Topic 4 โ€” LIMIT

LIMIT is used to control how many rows a SQL query returns.

It is especially useful when you want to see only the first few records, such as:

โ€ข Top 5 highest salaries

โ€ข Top 10 products by sales

โ€ข First 20 customers

โ€ข Latest 10 transactions

๐Ÿ”น Basic Syntax

SELECT *
FROM employees
LIMIT 5;


This returns only 5 rows from the result.

๐Ÿ”น LIMIT with ORDER BY

This is where LIMIT becomes especially powerful.

Suppose you want the 5 highest-paid employees:

SELECT employee_name, salary
FROM employees
ORDER BY salary DESC
LIMIT 5;


The logical idea is:

Filter โ†’ Sort โ†’ Take required number of rows

For example:

Salary
120000
110000
95000
90000
85000


Only the top 5 rows are returned.

๐Ÿ”น LIMIT Without ORDER BY

You can write:

SELECT *
FROM employees
LIMIT 5;


But without ORDER BY, you should not assume these are the "first" or "top" 5 meaningful records.

The database does not guarantee a particular order unless you explicitly specify one.

So for analysis, this is usually better:

SELECT *
FROM employees
ORDER BY salary DESC
LIMIT 5;


๐Ÿ”น LIMIT with WHERE

You can combine WHERE, ORDER BY, and LIMIT.

Example:

SELECT employee_name, salary
FROM employees
WHERE department = 'IT'
ORDER BY salary DESC
LIMIT 3;


This finds the 3 highest-paid employees in the IT department.

๐Ÿ”น LIMIT for Top-N Analysis

Top-N queries are extremely common in data analysis.

Top 10 products by sales

SELECT product_name, sales
FROM products
ORDER BY sales DESC
LIMIT 10;


5 most recent transactions

SELECT transaction_id, transaction_date, amount
FROM transactions
ORDER BY transaction_date DESC
LIMIT 5;


3 cheapest products

SELECT product_name, price
FROM products
ORDER BY price ASC
LIMIT 3;


๐Ÿ”น LIMIT with OFFSET

OFFSET allows you to skip a certain number of rows before returning results.

Example:

SELECT *
FROM employees
LIMIT 5 OFFSET 10;


This means:

Skip 10 rows

โ†“

Return the next 5 rows

This is commonly used for pagination.

For example:

โ€ข Page 1 โ†’ LIMIT 10 OFFSET 0

โ€ข Page 2 โ†’ LIMIT 10 OFFSET 10

โ€ข Page 3 โ†’ LIMIT 10 OFFSET 20

Syntax can vary between SQL databases, so always check the specific database you are using.

๐Ÿ”น LIMIT vs TOP vs FETCH

Different SQL databases may use different syntax.

MySQL/PostgreSQL/SQLite commonly use:

LIMIT 5;

SQL Server commonly uses:

SELECT TOP 5 *
FROM employees;


Standard SQL also supports:

FETCH FIRST 5 ROWS ONLY;

The concept is the same: restrict the number of returned rows.

๐Ÿ”น Real-World Data Science Example

Suppose an analyst wants to investigate the 10 largest customer transactions.

SELECT customer_id,
transaction_id,
amount
FROM transactions
ORDER BY amount DESC
LIMIT 10;


This can help identify:

โ€ข High-value transactions

โ€ข Potential anomalies

โ€ข Important customers

โ€ข Transactions requiring further investigation

๐Ÿ”น Common Mistakes

Mistake 1 โ€” Using LIMIT without sorting

SELECT *
FROM products
LIMIT 10;


This does not necessarily mean "10 best products."

For that:

ORDER BY sales DESC
LIMIT 10;


Mistake 2 โ€” Using ASC when you need the highest values

Wrong:

ORDER BY salary ASC
LIMIT 5;


This returns the lowest salaries.

For the highest salaries:
โค1
ORDER BY salary DESC
LIMIT 5;


Mistake 3 โ€” Forgetting that LIMIT applies after sorting

For a top-N analysis, think:

ORDER BY โ†’ LIMIT

not simply:

LIMIT โ†’ assume top records

๐Ÿ”น Interview Questions

1. What is LIMIT?

LIMIT restricts the number of rows returned by a query.

2. How do you find the top 10 salaries?

SELECT *
FROM employees
ORDER BY salary DESC
LIMIT 10;


3. Can LIMIT be used with WHERE?

Yes.

SELECT *
FROM employees
WHERE department = 'Finance'
LIMIT 5;


4. Why is ORDER BY important when using LIMIT?

Because without sorting, the returned rows are not necessarily the highest, lowest, newest, or oldest records you want.

5. What is OFFSET used for?

OFFSET skips a specified number of rows before returning the requested rows, commonly for pagination.

๐ŸŽฏ Double Tap โค๏ธ For More
โค5
๐ŸŽ“ ๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ผ๐—ณ๐˜ ๐—™๐—ฅ๐—˜๐—˜ ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ ๐˜„๐—ถ๐˜๐—ต ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ฒ๐˜€! ๐Ÿš€๐Ÿ”ฅ

Upgrade your resume with Microsoft learning opportunities. Explore courses covering some of today's most in-demand tech skills!

๐ŸŽฏ Perfect for Students โ€ข Freshers โ€ข Job Seekers โ€ข Working Professionals

โœ… Learn at your own pace โœ… Build career-relevant skills โœ… Explore available certificates and credentials

๐Ÿ”— ๐—”๐—ฐ๐—ฐ๐—ฒ๐˜€๐˜€ ๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ผ๐—ณ๐˜ ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ ๐—›๐—ฒ๐—ฟ๐—ฒ ๐Ÿ‘‡

https://pdlink.in/3Uf5trR

๐Ÿ”ฅ Share with friends looking to upskill in 2026!
โค1
๐Ÿ”ฌ Kandinsky 6.0 Video: Training Details and Architecture

The new Kandinsky 6.0 Video lineup โ€” the flagship Pro (29B) and the lightweight Lite (3B) โ€” uses a dual-stream architecture: a video stream and an audio stream connected by bidirectional cross-attention.

๐Ÿ“š Training methodology:
โ€ข Audio stream: pretrained from scratch on 40 million audio tracks; joint training: 7 million audio-video segments
โ€ข Selection criteria: high-quality sound, close-up shots of speaking people
โ€ข Objective: precise synchronization of speech and facial expressions

๐Ÿ— Architecture:
Two connected streams:
1. Video stream
2. Audio stream
The streams are connected by bidirectional cross-attention for temporal and semantic alignment.

๐ŸŽฏ Key capabilities:
โ€ข Lip-sync technology
โ€ข Wide audio range (speech, effects, ambient)
โ€ข Consumer GPU deployment (block offloading, 16โ€“32 GB VRAM presets)
โ€ข Realistic physics modeling

๐Ÿ“Š Performance metrics:
โ€ข vs Kandinsky 5.0: clear advantage across all criteria (visual quality, prompt adherence, camera movement)
โ€ข vs LTX 2.5: preferred in visual quality and speech quality
โ€ข vs Veo 3.1 Fast: superior in image animation tasks

๐Ÿ”ง Specifications:
โ€ข Resolutions: SD, HD, Full HD
โ€ข Audio quality: 44 kHz
โ€ข Duration: up to 5 seconds
โ€ข License: MIT

๐Ÿ”— Hugging Face
โค4
๐Ÿ‡ฎ๐Ÿ‡ณ ๐—š๐—ข๐—ฉ๐—˜๐—ฅ๐—ก๐— ๐—˜๐—ก๐—ง ๐—ข๐—™ ๐—œ๐—ก๐——๐—œ๐—” โ€” ๐—”๐—œ๐—–๐—ง๐—˜ ๐—œ๐—ก๐—ง๐—˜๐—ฅ๐—ก๐—ฆ๐—›๐—œ๐—ฃ๐—ฆ ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ ๐Ÿš€

Students and freshers can explore internship opportunities through the AICTE Internship Portal across multiple domains:

๐Ÿ’ป AI, Data Science & Web Development
๐Ÿ“ˆ Digital Marketing & Business Development
๐Ÿ’ฐ Finance & Accounting
โœ๏ธ Content Writing & Graphic Design
โš™๏ธ Mechanical, Civil & Electrical Engineering

๐Ÿ”— ๐—–๐—ต๐—ฒ๐—ฐ๐—ธ ๐—ข๐—ฝ๐—ฝ๐—ผ๐—ฟ๐˜๐˜‚๐—ป๐—ถ๐˜๐—ถ๐—ฒ๐˜€ & ๐—”๐—ฝ๐—ฝ๐—น๐˜† ๐Ÿ‘‡

https://pdlink.in/4y3vcBl

๐Ÿ“ข Share this opportunity with your friends and classmates!
โค4
๐Ÿš€ ๐—ช๐—ต๐—ถ๐—ฐ๐—ต ๐—ง๐—ฒ๐—ฐ๐—ต ๐—ฆ๐—ธ๐—ถ๐—น๐—น ๐—ช๐—ถ๐—น๐—น ๐—ฌ๐—ผ๐˜‚ ๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ ๐—ถ๐—ป ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ?

Want to build apps, uncover insights, or create AI solutions? Explore certification courses that match your career goals! ๐ŸŽฏ

๐Ÿ’ป ๐—™๐˜‚๐—น๐—น ๐—ฆ๐˜๐—ฎ๐—ฐ๐—ธ ๐——๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—บ๐—ฒ๐—ป๐˜
๐Ÿ‘‰ https://pdlink.in/3SuUeuD

๐Ÿ“Š ๐——๐—ฎ๐˜๐—ฎ ๐—”๐—ป๐—ฎ๐—น๐˜†๐˜๐—ถ๐—ฐ๐˜€
๐Ÿ‘‰ https://pdlink.in/45vk5ph

๐Ÿ’ซ๐—”๐—œ ๐—˜๐—ป๐—ด๐—ถ๐—ป๐—ฒ๐—ฒ๐—ฟ๐—ถ๐—ป๐—ด
๐Ÿ‘‰ https://pdlink.in/4fWJVID

๐Ÿ”ฅ Choose your path, sharpen your skills, and take the next step towards your tech career!

๐Ÿ“Œ Save this post & share it with a friend planning to upskill.
โค3
๐Ÿš€ Data Science Roadmap 2026

๐Ÿ“ Phase 3: SQL for Data Science

๐Ÿ“– Topic 6 โ€” GROUP BY

GROUP BY is used to group rows that have the same value in one or more columns.

It is mainly used when you want to perform calculations for each group.

For example:

โ€ข Total sales by region

โ€ข Average salary by department

โ€ข Number of customers by city

โ€ข Total orders by product

โ€ข Maximum transaction by category

๐Ÿ”น Basic Syntax

SELECT column_name, aggregate_function(column_name)
FROM table_name
GROUP BY column_name;


Common aggregate functions:

โ€ข COUNT() โ†’ Count rows

โ€ข SUM() โ†’ Calculate total

โ€ข AVG() โ†’ Calculate average

โ€ข MIN() โ†’ Find minimum

โ€ข MAX() โ†’ Find maximum

๐Ÿ”น Simple Example

Suppose we have:

department   salary
IT 60000
IT 80000
HR 50000
HR 70000
Finance 90000


Query:

SELECT department, AVG(salary) AS avg_salary
FROM employees
GROUP BY department;


Result:

department   avg_salary
IT 70000
HR 60000
Finance 90000


Instead of calculating one overall average, SQL calculates an average for each department.

๐Ÿ”น GROUP BY with COUNT()

To count employees in each department:

SELECT department, COUNT(*) AS employee_count
FROM employees
GROUP BY department;


Result:

department   employee_count
IT 2
HR 2
Finance 1


๐Ÿ”น GROUP BY with SUM()

Suppose you have sales data:

region   sales
North 10000
North 15000
South 20000
South 12000


Query:

SELECT region, SUM(sales) AS total_sales
FROM sales
GROUP BY region;


Result:

North   25000
South 32000


This is extremely common in business analytics.

๐Ÿ”น GROUP BY with MAX()

Find the highest salary in each department:

SELECT department, MAX(salary) AS highest_salary
FROM employees
GROUP BY department;


๐Ÿ”น GROUP BY with MIN()

Find the lowest salary in each department:

SELECT department, MIN(salary) AS lowest_salary
FROM employees
GROUP BY department;


๐Ÿ”น GROUP BY with Multiple Columns

You can group by multiple columns.

SELECT department, job_title, COUNT(*) AS employee_count
FROM employees
GROUP BY department, job_title;


Here SQL creates groups based on:

department + job_title

For example:

IT        Analyst       5
IT Developer 8
HR Analyst 3
Finance Manager 4


๐Ÿ”น GROUP BY with WHERE

WHERE filters rows before grouping.

SELECT department, AVG(salary) AS avg_salary
FROM employees
WHERE salary > 50000
GROUP BY department;


๐Ÿ”น GROUP BY with ORDER BY

You can sort grouped results.

For example, find departments with the highest total salary first:

SELECT department, SUM(salary) AS total_salary
FROM employees
GROUP BY department
ORDER BY total_salary DESC;


This is very useful for ranking groups.

๐Ÿ”น GROUP BY vs DISTINCT

These two can sometimes look similar.

DISTINCT

SELECT DISTINCT department
FROM employees;


Used to find unique departments.

GROUP BY

SELECT department, COUNT(*)
FROM employees
GROUP BY department;
โค3
Used when you want to perform calculations for each department.

Simple rule:

DISTINCT โ†’ Give me unique values

GROUP BY โ†’ Give me groups so I can calculate something

๐Ÿ”น Real-World Data Science Example

Imagine an e-commerce dataset.

You want to know the total revenue generated by each product category.

SELECT category,
SUM(quantity * price) AS total_revenue
FROM sales
GROUP BY category
ORDER BY total_revenue DESC;


This gives you a category-level summary that can be used for:

โ€ข Revenue analysis

โ€ข Product performance

โ€ข Business reporting

โ€ข Feature creation

โ€ข Exploratory data analysis

๐Ÿ”น Common Mistake

Consider:

SELECT department, employee_name, AVG(salary)
FROM employees
GROUP BY department;


This can cause an error in many SQL databases because employee_name is neither:

โ€ข included in GROUP BY, nor

โ€ข used inside an aggregate function.

A valid query would be:

SELECT department, AVG(salary)
FROM employees
GROUP BY department;


๐Ÿ”น Important Rule

When using GROUP BY, selected columns generally need to be either:

1. Included in the GROUP BY, or

2. Wrapped inside an aggregate function.

Example:

SELECT department, COUNT(*)
FROM employees
GROUP BY department;


department โ†’ grouped column

COUNT(*) โ†’ aggregate

๐Ÿ”น Interview Questions

1. What is GROUP BY?

GROUP BY groups rows with the same values so aggregate calculations can be performed for each group.

2. Which aggregate functions are commonly used with GROUP BY?

COUNT(), SUM(), AVG(), MIN(), and MAX().

3. What is the difference between WHERE and GROUP BY?

WHERE filters individual rows before grouping.

GROUP BY creates groups from the filtered rows.

4. Can GROUP BY use multiple columns?

Yes.

GROUP BY department, job_title;

5. Can GROUP BY be used without aggregate functions?

Yes, although DISTINCT is often clearer when the goal is simply to return unique combinations.

๐ŸŽฏ Practice Questions

1. Find the number of employees in each department.

2. Find the average salary for each department.

3. Find the total sales for each region.

4. Find the highest salary in each department.

5. Find the total revenue for each product category and sort categories from highest to lowest revenue.

๐ŸŽฏ Key Takeaways

โ€ข GROUP BY creates groups of similar rows.

โ€ข It is commonly used with aggregate functions.

โ€ข COUNT() counts.

โ€ข SUM() totals.

โ€ข AVG() calculates averages.

โ€ข MIN() finds the minimum.

โ€ข MAX() finds the maximum.

โ€ข WHERE filters rows before grouping.

โ€ข ORDER BY can sort grouped results.

โ€ข GROUP BY is one of the most important SQL concepts for Data Science and Analytics.

๐Ÿ“Double Tap โค๏ธ For More
โค3