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
๐—”๐—œ ๐—ฎ๐—ป๐—ฑ ๐— ๐—Ÿ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ ๐—ฏ๐˜† ๐—–๐—–๐—˜, ๐—œ๐—œ๐—ง ๐— ๐—ฎ๐—ป๐—ฑ๐—ถ๐Ÿ˜

Freshers get 15 LPA Average Salary with AI & ML Skills!

๐Ÿ’ป 100% Online
โณ 6 Months Duration
๐Ÿ‘จโ€๐Ÿซ Learn from IIT Professors
๐Ÿ“Œ Open for Students ,Freshers & Working Professionals

๐Ÿ’ผ Placement Assistance with 5000+ Companies
๐Ÿ“ˆ High Demand Skills for Future Tech Jobs

Top companies are hiring for candidates with ๐—”๐—œ, ๐— ๐—ฎ๐—ฐ๐—ต๐—ถ๐—ป๐—ฒ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป๐—ถ๐—ป๐—ด skills in 2026

๐Ÿ”ฅDeadline :- 17th May

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

https://pdlink.in/4nmI024
.
Get Placement Assistance With 5000+ Companies
โค1
โœ… Stored Procedures ๐Ÿ’ฏ

๐Ÿง  1. What is a Stored Procedure?
A Stored Procedure is a saved SQL program
โ€ข Stored inside the database
โ€ข Can be executed anytime

Think like this ๐Ÿ‘‡
โ€œReusable SQL code blockโ€

โšก 2. Why Use Stored Procedures?
โ€ข Reuse SQL logic
โ€ข Reduce repeated code
โ€ข Better security
โ€ข Faster execution for repeated tasks

โšก 3. Basic Syntax

๐Ÿ‘‰ MySQL Example:
DELIMITER //

CREATE PROCEDURE GetEmployees()
BEGIN
SELECT * FROM employees;
END //

DELIMITER ;

โ–ถ๏ธ 4. Execute Stored Procedure
CALL GetEmployees();

๐Ÿ”ฅ 5. Procedure with Parameter
DELIMITER //

CREATE PROCEDURE GetDeptEmployees(IN dept_name VARCHAR(50))
BEGIN
SELECT * FROM employees
WHERE department = dept_name;
END //

DELIMITER ;

โ–ถ๏ธ 6. Execute Parameterized Procedure
CALL GetDeptEmployees('IT');

โŒ 7. Drop Stored Procedure
DROP PROCEDURE GetEmployees;

๐ŸŽฏ 8. Real Example
Increase salary for all IT employees:

DELIMITER //

CREATE PROCEDURE IncreaseSalary()
BEGIN
UPDATE employees
SET salary = salary + 5000
WHERE department = 'IT';
END //

DELIMITER ;

๐ŸŽฏ 9. Practice Tasks
1. Create procedure to show all employees
2. Create procedure for HR employees
3. Create procedure with salary parameter
4. Execute stored procedure
5. Drop procedure

โšก Mini Challenge ๐Ÿ”ฅ

Create procedure to return employees with salary > given value

โœ… Solution

DELIMITER //

CREATE PROCEDURE GetHighSalaryEmployees(IN min_salary INT)
BEGIN
SELECT *
FROM employees
WHERE salary > min_salary;
END //

DELIMITER ;

โ–ถ๏ธ Execute Procedure

CALL GetHighSalaryEmployees(50000);

โœ” Returns employees earning more than 50k

Key Difference:
โ€ข Function โ†’ returns value
โ€ข Procedure โ†’ performs action / multiple operations

Double Tap โค๏ธ For More
โค3
๐Ÿš€ ๐—•๐—ฒ๐—ฐ๐—ผ๐—บ๐—ฒ ๐—๐—ผ๐—ฏ-๐—ฅ๐—ฒ๐—ฎ๐—ฑ๐˜† ๐—ถ๐—ป ๐——๐—ฎ๐˜๐—ฎ ๐—ฆ๐—ฐ๐—ถ๐—ฒ๐—ป๐—ฐ๐—ฒ & ๐—”๐—œ ๐˜„๐—ถ๐˜๐—ต ๐—œ๐—ป๐—ฑ๐˜‚๐˜€๐˜๐—ฟ๐˜† ๐—˜๐˜…๐—ฝ๐—ฒ๐—ฟ๐˜๐˜€! ๐Ÿ“Š

Learn the most in-demand skills of 2026

๐Ÿ’ซData Science ,AI,ML &Python & SQL
โœ…
๐Ÿ’ผ Get Placement Assistance
๐ŸŽ“ Beginner Friendly Program
๐Ÿ’ป Learn Online from Anywhere
๐Ÿ“ˆ Build Skills Companies Actually Hire For

๐Ÿ”ฅ AI is changing every industry โ€” this is the best time to upskill and secure high-paying tech jobs.

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

 https://pdlink.in/4fdWxJB

โšก Limited Seats Available โ€“ Apply Fast!
โค1
Which command is used to execute a stored procedure in MySQL?
Anonymous Quiz
54%
A. EXECUTE
20%
B. RUN
22%
C. CALL
4%
D. START
Which keyword is used to pass input parameter in MySQL procedure?
Anonymous Quiz
4%
A. OUT
38%
B. INPUT
28%
C. PARAM
31%
D. IN
๐—ฃ๐—ฟ๐—ผ๐—ฑ๐˜‚๐—ฐ๐˜ ๐— ๐—ฎ๐—ป๐—ฎ๐—ด๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐˜„๐—ถ๐˜๐—ต ๐—”๐—œ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ 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