SQL Programming Resources
75.5K subscribers
516 photos
13 files
472 links
Find top SQL resources from global universities, cool projects, and learning materials for data analytics.

Admin: @coderfun

Useful links: heylink.me/DataAnalytics

Promotions: @love_data
Download Telegram
๐—ฃ๐—ฟ๐—ผ๐—ฑ๐˜‚๐—ฐ๐˜ ๐— ๐—ฎ๐—ป๐—ฎ๐—ด๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐˜„๐—ถ๐˜๐—ต ๐—”๐—œ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ by iHUB IIT Roorkee ๐Ÿ˜

Freshers get paid 12 LPA average salary for the role of Associate Product Manager! ๐Ÿ’ผ

๐—›๐—ถ๐—ด๐—ต๐—น๐—ถ๐—ด๐—ต๐˜๐˜€:
โœ… Learn from IIT Roorkee Professors
โœ…Placement support from 5,000+ companies
โœ… Professional Certification in Product Management with Applied AI
โœ… 100% Online Program
โœ… Open to Everyone

๐Ÿ“…๐——๐—ฒ๐—ฎ๐—ฑ๐—น๐—ถ๐—ป๐—ฒ: 17th May 2026

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

https://pdlink.in/4ddJZ5C

โšก Limited Seats Available โ€” Apply Soon!
๐Ÿ”ฅ Now, letโ€™s move to the next topic:

Triggers in SQL
(Automation inside database ๐Ÿ’ฏ)

๐Ÿง  1. What is a Trigger?
A Trigger is a special SQL block
๐Ÿ‘‰ that runs automatically
๐Ÿ‘‰ when an event happens in a table

Think like this ๐Ÿ‘‡
๐Ÿ‘‰ โ€œAutomatic action on INSERT / UPDATE / DELETEโ€

โšก 2. Why Use Triggers?
โœ” Automatic logging
โœ” Data validation
โœ” Audit tracking
โœ” Prevent invalid operations

โšก 3. Types of Triggers
BEFORE INSERT โ†’ Runs before inserting data
AFTER INSERT โ†’ Runs after inserting data
BEFORE UPDATE โ†’ Runs before updating
AFTER UPDATE โ†’ Runs after updating
BEFORE DELETE โ†’ Runs before deleting
AFTER DELETE โ†’ Runs after deleting

๐Ÿ”ฅ 4. Basic Trigger Example
๐Ÿ‘‰ Automatically log inserted employee

CREATE TABLE employee_log (
log_message VARCHAR(255)
);

DELIMITER //

CREATE TRIGGER after_employee_insert
AFTER INSERT ON employees
FOR EACH ROW
BEGIN
INSERT INTO employee_log
VALUES (CONCAT('New employee added: ', NEW.name));
END //

DELIMITER ;

๐Ÿง  5. Important Keywords
NEW โ†’ New inserted/updated value
OLD โ†’ Previous value before update/delete

โšก 6. BEFORE UPDATE Example
๐Ÿ‘‰ Prevent negative salary
DELIMITER //

CREATE TRIGGER check_salary
BEFORE UPDATE ON employees
FOR EACH ROW
BEGIN
IF NEW.salary < 0 THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = 'Salary cannot be negative';
END IF;
END //

DELIMITER ;

โŒ 7. Drop Trigger
DROP TRIGGER after_employee_insert;

๐ŸŽฏ 8. Practice Tasks
1. Create AFTER INSERT trigger
2. Create BEFORE UPDATE trigger
3. Prevent negative salary using trigger
4. Log deleted employees
5. Drop created trigger

โšก Mini Challenge ๐Ÿ”ฅ
๐Ÿ‘‰ Create trigger to automatically save deleted employee names into another table

๐Ÿ”ฅ Mini Challenge Solution

๐Ÿ‘‰ Automatically save deleted employee names into another table

โœ… Step 1: Create Log Table

CREATE TABLE deleted_employees (
emp_id INT,
name VARCHAR(50),
deleted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

โœ… Step 2: Create Trigger

DELIMITER //

CREATE TRIGGER log_deleted_employee
AFTER DELETE ON employees
FOR EACH ROW
BEGIN
INSERT INTO deleted_employees(emp_id, name)
VALUES (OLD.emp_id, OLD.name);
END //

DELIMITER ;

๐Ÿง  How It Works

๐Ÿ‘‰ AFTER DELETE โ†’ runs automatically after deletion

๐Ÿ‘‰ OLD.emp_id and OLD.name
Access deleted row values before they disappear

โœ… Example

DELETE FROM employees
WHERE emp_id = 101;

โœ” Deleted employee info automatically saved in deleted_employees table ๐Ÿ’ฏ

๐Ÿ”ฅ Pro Tip
Triggers are powerful but:
โŒ Too many triggers can slow database
โœ… Use them carefully ๐Ÿ’ฏ

Double Tap โค๏ธ For More
โค5
๐—™๐—ฅ๐—˜๐—˜ ๐——๐—ฎ๐˜๐—ฎ ๐—”๐—ป๐—ฎ๐—น๐˜†๐˜๐—ถ๐—ฐ๐˜€ ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—ฏ๐˜† ๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ผ๐—ณ๐˜ & ๐—Ÿ๐—ถ๐—ป๐—ธ๐—ฒ๐—ฑ๐—œ๐—ป! ๐ŸŽ“

Stop scrolling! This is your chance to get certified by two of the biggest names in techโ€” ๐Ÿ“Š Level up your Data Skills for FREE!

โœ… What you get:
โ€ข Official Microsoft & LinkedIn Certification
โ€ข High-demand Data Analytics skills
โ€ข Perfect for your Resume/LinkedIn profile

๐—˜๐—ป๐—ฟ๐—ผ๐—น๐—น ๐—™๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜๐Ÿ‘‡:- 
 
https://pdlink.in/4ubzzcC

๐Ÿ‘‰Don't miss out on this career upgrade. Limited time offer!
โค3
Which event can activate a trigger?
Anonymous Quiz
12%
A. INSERT
13%
B. UPDATE
1%
C. DELETE
73%
D. All of the above
โค1
Which trigger type runs before data is inserted?
Anonymous Quiz
16%
A. AFTER INSERT
69%
B. BEFORE INSERT
6%
C. BEFORE DELETE
9%
D. AFTER UPDATE
โค4
๐—ฃ๐—ฎ๐˜† ๐—”๐—ณ๐˜๐—ฒ๐—ฟ ๐—ฃ๐—น๐—ฎ๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ ๐—ง๐—ผ ๐—•๐—ฒ๐—ฐ๐—ผ๐—บ๐—ฒ ๐—ฎ ๐—๐—ผ๐—ฏ-๐—ฅ๐—ฒ๐—ฎ๐—ฑ๐˜† ๐—ฆ๐—ผ๐—ณ๐˜๐˜„๐—ฎ๐—ฟ๐—ฒ ๐——๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—ฒ๐—ฟ๐Ÿ”ฅ

No upfront fees. Learn first, pay only after you get placed! ๐Ÿ’ผโœจ

๐Ÿš€ What Youโ€™ll Get:
โœ… Full Stack Development Training
โœ… GenAI + Real Industry Projects
โœ… Live Classes & 1:1 Mentorship
โœ… Mock Interviews & Resume Support
โœ… 500+ Hiring Partners
โœ… Average Package: 7.4 LPA

๐ŸŽฏ Ideal for:- Freshers , College Students, Career Switchers & Anyone looking to enter Tech

๐Ÿ’ป Learn In-Demand Skills & Build Your Dream Tech Career!

๐‘๐ž๐ ๐ข๐ฌ๐ญ๐ž๐ซ ๐๐จ๐ฐ ๐Ÿ‘‡:-

 https://pdlink.in/42WOE5H

Hurry! Limited seats are available.๐Ÿƒโ€โ™‚๏ธ
๐Ÿคฃ2
How to Crack a Data Analyst Job Faster

1๏ธโƒฃ Fix Your Resume
- One page, clean layout, show impact (not tools)
- Example: Improved sales reporting accuracy by 18% using SQL & Power BI
- Add links: GitHub, Portfolio, LinkedIn

2๏ธโƒฃ Prepare Smart for Interviews
- SQL: joins, window functions, CTEs (daily practice)
- Excel: case questions (pivots, formulas)
- Power BI/Tableau: explain one dashboard end-to-end
- Python: pandas (groupby, merge, missing values)

3๏ธโƒฃ Master Business Thinking
- Ask why the data exists
- Translate numbers into decisions
- Example: High month-2 churn โ†’ poor onboarding

4๏ธโƒฃ Build a Strong Portfolio
- 3 solid projects > 10 weak ones
- Projects:
- Customer churn analysis
- Sales performance dashboard
- Marketing funnel analysis

5๏ธโƒฃ Apply With Strategy
- Apply to 5-10 roles daily
- Customize resume keywords
- Reach out to hiring managers (referrals = 3x interviews)

6๏ธโƒฃ Track Progress
- Maintain interview log
- Fix gaps weekly

๐ŸŽฏ Skills get you shortlisted. Thinking gets you hired.
โค6
๐—™๐—ฅ๐—˜๐—˜ ๐—ข๐—ป๐—น๐—ถ๐—ป๐—ฒ ๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ๐—ฐ๐—น๐—ฎ๐˜€๐˜€ ๐—ข๐—ป ๐——๐—ฎ๐˜๐—ฎ ๐—”๐—ป๐—ฎ๐—น๐˜†๐˜๐—ถ๐—ฐ๐˜€ ( ๐—•๐˜‚๐˜€๐—ถ๐—ป๐—ฒ๐˜€๐˜€ ๐—”๐—ป๐—ฎ๐—น๐˜†๐˜๐—ถ๐—ฐ๐˜€)๐Ÿ˜

Learn the Latest 5 Analytics Tools in 2026

Learn Essential skills to stay competitive in the evolving job market

Eligibility :- Students ,Graduates & Working Professionals 

๐—ฅ๐—ฒ๐—ด๐—ถ๐˜€๐˜๐—ฒ๐—ฟ ๐—™๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜ ๐Ÿ‘‡:-

https://pdlink.in/4tFlovr

(Limited Slots ..HurryUp๐Ÿƒโ€โ™‚๏ธ

๐ƒ๐š๐ญ๐ž & ๐“๐ข๐ฆ๐ž:- 20th May 2026, at 7 PM
โค1
Which command permanently saves changes?
Anonymous Quiz
6%
A. ROLLBACK
39%
B. SAVEPOINT
53%
C. COMMIT
2%
D. DELETE
Which command is used to undo changes?
Anonymous Quiz
1%
A. SAVE
7%
B. COMMIT
8%
C. DROP
84%
D. ROLLBACK
โค2
Which ACID property means โ€œall or nothingโ€?
Anonymous Quiz
24%
A. Consistency
16%
B. Isolation
51%
C. Atomicity
9%
D. Durability
๐Ÿš€ ๐—™๐—ฅ๐—˜๐—˜ ๐—•๐—ฒ๐—ด๐—ถ๐—ป๐—ป๐—ฒ๐—ฟ ๐—ง๐—ฒ๐—ฐ๐—ต ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ ๐—ง๐—ผ ๐—จ๐—ฝ๐—ด๐—ฟ๐—ฎ๐—ฑ๐—ฒ ๐—ฌ๐—ผ๐˜‚๐—ฟ ๐—–๐—ฎ๐—ฟ๐—ฒ๐—ฒ๐—ฟ ๐Ÿ”ฅ

Still confused where to start in tech? ๐Ÿค”
These FREE beginner-friendly courses can help you build job-ready skills in 2026 ๐Ÿš€

โœจ Learn in-demand skills like:
โœ”๏ธ Programming & Tech Basics
โœ”๏ธ Data & Digital Skills ๐Ÿ“Š
โœ”๏ธ Career-Boosting Concepts ๐Ÿ’ก
โœ”๏ธ Industry-Relevant Fundamentals

๐Ÿ’ฏ Beginner Friendly + FREE Certificates ๐ŸŽ“

๐—˜๐—ป๐—ฟ๐—ผ๐—น๐—น ๐—™๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜๐Ÿ‘‡:

https://pdlink.in/4d4b1uK

๐Ÿ’ผ Perfect for Students, Freshers & Career Switchers
โœ…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: Descriptive 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 scripting 
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!
โค7
๐Ÿ”ฅ Now, letโ€™s move to the next topic:

โœ… Normalization in SQL

๐Ÿง  1. What is Normalization?

Normalization is the process of
๐Ÿ‘‰ organizing data properly
๐Ÿ‘‰ reducing duplicate data
๐Ÿ‘‰ improving database structure

Think like this ๐Ÿ‘‡
โŒ Bad database โ†’ repeated data everywhere
โœ… Normalized database โ†’ clean & efficient

โšก 2. Why Normalization?
โœ” Reduce data redundancy
โœ” Avoid duplicate data
โœ” Improve consistency
โœ” Easier updates

๐Ÿ“Š Example (Without Normalization)
Student data repeated multiple times
student_id student_name course instructor
1 Amit SQL Rahul
1 Amit Python Rahul

โœ… After Normalization
๐Ÿ‘จโ€๐ŸŽ“ Students Table
student_id student_name
1 Amit

๐Ÿ“˜ Courses Table
course_id course
101 SQL

๐Ÿ“ Enrollment Table
student_id course_id
1 101

โœ” Cleaner structure ๐Ÿ’ฏ

๐Ÿ”ฅ 3. Types of Normalization

Normal Form Purpose
1NF Remove repeating groups
2NF Remove partial dependency
3NF Remove transitive dependency

โšก 4. First Normal Form (1NF)
๐Ÿ‘‰ Each column should contain atomic values

โŒ Wrong:
student courses
Amit SQL, Python

โœ… Correct:
student course
Amit SQL
Amit Python

โšก 5. Second Normal Form (2NF)
๐Ÿ‘‰ Must already be in 1NF
๐Ÿ‘‰ Remove partial dependency

Non-key columns should depend on full primary key

โšก 6. Third Normal Form (3NF)
๐Ÿ‘‰ Must already be in 2NF
๐Ÿ‘‰ Remove transitive dependency

Non-key columns should depend ONLY on primary key

๐ŸŽฏ 7. Practice Tasks
1. Identify duplicate data
2. Convert table into 1NF
3. Split data into multiple tables
4. Identify primary keys
5. Convert table into 3NF

โšก Mini Challenge ๐Ÿ”ฅ
๐Ÿ‘‰ Normalize a student-course database into 3NF

Double Tap โค๏ธ For More
โค6๐Ÿ˜2
๐—”๐—œ/๐— ๐—Ÿ ๐—ฟ๐—ผ๐—น๐—ฒ๐˜€ ๐—ฎ๐—ฟ๐—ฒ ๐—ณ๐—ฎ๐˜€๐˜๐—ฒ๐˜€๐˜-๐—ด๐—ฟ๐—ผ๐˜„๐—ถ๐—ป๐—ด ๐—ฐ๐—ฎ๐—ฟ๐—ฒ๐—ฒ๐—ฟ ๐—ณ๐—ถ๐—ฒ๐—น๐—ฑ ๐—ถ๐—ป ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ๐Ÿ˜

The demand is real, salaries are high, and the talent gap is wide open

Enrol for AI/ML Certification Program by CCE, IIT Mandi!

Eligibility: Open to everyone
Duration: 6 Months
Program Mode: Online
Taught By: IIT Mandi Professors

Deadline :- 23rd May

๐—ฅ๐—ฒ๐—ด๐—ถ๐˜€๐˜๐—ฒ๐—ฟ ๐—ก๐—ผ๐˜„๐Ÿ‘‡ :-

https://pdlink.in/4nmI024
.
๐ŸŽ“Get Placement Assistance With 5000+ Companies
โค1
Which normal form removes repeating groups?
Anonymous Quiz
50%
A. 1NF
27%
B. 2NF
14%
C. 3NF
8%
D. BCNF