SQL Programming Resources
76.2K subscribers
569 photos
12 files
533 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
๐Ÿš€ SQL Project Series #5

E-Commerce Sales Analysis โ€“ Advanced Business Analytics

In this part, we'll solve real-world business problems that Data Analysts encounter while working with customer, sales, and product data.

31. Calculate Customer Lifetime Value (CLV)
SELECT
o.customer_id,
SUM(oi.quantity * oi.unit_price) AS customer_lifetime_value
FROM orders o
JOIN order_items oi
ON o.order_id = oi.order_id
GROUP BY o.customer_id
ORDER BY customer_lifetime_value DESC;

32. Calculate Repeat Purchase Rate
WITH customer_orders AS (
SELECT
customer_id,
COUNT(*) AS total_orders
FROM orders
GROUP BY customer_id
)
SELECT
ROUND(
100.0 *
COUNT(CASE WHEN total_orders > 1 THEN 1 END) /
COUNT(*),
2
) AS repeat_purchase_rate
FROM customer_orders;

33. Find New vs Returning Customers
WITH first_order AS (
SELECT
customer_id,
MIN(order_date) AS first_order_date
FROM orders
GROUP BY customer_id
)
SELECT
CASE
WHEN o.order_date = f.first_order_date
THEN 'New Customer'
ELSE 'Returning Customer'
END AS customer_type,
COUNT(*) AS total_orders
FROM orders o
JOIN first_order f
ON o.customer_id = f.customer_id
GROUP BY customer_type;

34. Find Customer Retention by Month
WITH monthly_orders AS (
SELECT DISTINCT
customer_id,
DATE_TRUNC('month', order_date) AS order_month
FROM orders
)
SELECT
order_month,
COUNT(DISTINCT customer_id) AS active_customers
FROM monthly_orders
GROUP BY order_month
ORDER BY order_month;

35. Find Customers Who Purchased from Multiple Categories
SELECT
o.customer_id,
COUNT(DISTINCT p.category) AS categories_purchased
FROM orders o
JOIN order_items oi
ON o.order_id = oi.order_id
JOIN products p
ON oi.product_id = p.product_id
GROUP BY o.customer_id
HAVING COUNT(DISTINCT p.category) > 1;

36. Find the Most Frequently Purchased Product Pair
SELECT
oi1.product_id AS productโ‚,
oi2.product_id AS productโ‚‚,
COUNT(*) AS purchase_count
FROM order_items oi1
JOIN order_items oi2
ON oi1.order_id = oi2.order_id
AND oi1.product_id < oi2.product_id
GROUP BY oi1.product_id, oi2.product_id
ORDER BY purchase_count DESC
LIMIT 10;

37. Calculate Average Days Between Orders
WITH customer_orders AS (
SELECT
customer_id,
order_date,
LAG(order_date) OVER (
PARTITION BY customer_id
ORDER BY order_date
) AS previous_order
FROM orders
)
SELECT
customer_id,
ROUND(
AVG(order_date - previous_order),
2
) AS avg_days_between_orders
FROM customer_orders
WHERE previous_order IS NOT NULL
GROUP BY customer_id;

38. Find the Fastest Growing Product Category
WITH monthly_category_sales AS (
SELECT
DATE_TRUNC('month', o.order_date) AS month,
p.category,
SUM(oi.quantity * oi.unit_price) AS revenue
FROM orders o
JOIN order_items oi
ON o.order_id = oi.order_id
JOIN products p
ON oi.product_id = p.product_id
GROUP BY month, p.category
)
SELECT
month,
category,
revenue,
revenue -
LAG(revenue) OVER (
PARTITION BY category
ORDER BY month
) AS revenue_growth
FROM monthly_category_sales;

39. Identify Customers at Risk of Churn
SELECT
customer_id,
MAX(order_date) AS last_order_date
FROM orders
GROUP BY customer_id
HAVING MAX(order_date) <
CURRENT_DATE - INTERVAL '90 days';

40. Perform RFM Analysis
SELECT
customer_id,
CURRENT_DATE - MAX(order_date) AS recency,
COUNT(order_id) AS frequency,
SUM(oi.quantity * oi.unit_price) AS monetary
FROM orders o
JOIN order_items oi
ON o.order_id = oi.order_id
GROUP BY customer_id
ORDER BY monetary DESC;

๐Ÿ’ก Double Tap โค๏ธ For More
โค1
๐Ÿ“Š ๐——๐—ฎ๐˜๐—ฎ ๐—”๐—ป๐—ฎ๐—น๐˜†๐˜๐—ถ๐—ฐ๐˜€ ๐—™๐—ฅ๐—˜๐—˜ ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ ๐Ÿš€

โœ… 100% FREE learning opportunities
โœ… Great for students, freshers, and beginners
โœ… Help you build a stronger resume with recognized names like Cisco, Google, and Microsoft
โœ… Useful for analytics internships, off-campus drives, and fresher hiring

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

https://pdlink.in/4eRA6eF

๐Ÿš€ Start learning today. Build your analytics foundation. Earn free certifications. Move one step closer to your Data Analyst career.
โค2
๐Ÿ“Š Essential SQL Concepts Every Data Analyst Must Know

๐Ÿš€ SQL is the most important skill for Data Analysts. Almost every analytics job requires working with databases to extract, filter, analyze, and summarize data.

Understanding the following SQL concepts will help you write efficient queries and solve real business problems with data.

1๏ธโƒฃ SELECT Statement (Data Retrieval)

What it is: Retrieves data from a table.

SELECT name, salary
FROM employees;


Use cases: Retrieving specific columns, viewing datasets, extracting required information.

2๏ธโƒฃ WHERE Clause (Filtering Data)

What it is: Filters rows based on specific conditions.

SELECT *
FROM orders
WHERE order_amount > 500;


Common conditions: =, >, <, >=, <=, BETWEEN, IN, LIKE

3๏ธโƒฃ ORDER BY (Sorting Data)

What it is: Sorts query results in ascending or descending order.

SELECT name, salary
FROM employees
ORDER BY salary DESC;


Sorting options: ASC (default), DESC

4๏ธโƒฃ GROUP BY (Aggregation)

What it is: Groups rows with same values into summary rows.

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


Use cases: Sales per region, customers per country, orders per product category.

5๏ธโƒฃ Aggregate Functions

What they do: Perform calculations on multiple rows.

SELECT AVG(salary)
FROM employees;


Common functions: COUNT(), SUM(), AVG(), MIN(), MAX()

6๏ธโƒฃ HAVING Clause

What it is: Filters grouped data after aggregation.

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


Key difference: WHERE filters rows before grouping, HAVING filters groups after aggregation.

7๏ธโƒฃ SQL JOINS (Combining Tables)

What they do: Combine tables.

-- INNER JOIN
SELECT orders.order_id, customers.customer_name
FROM orders
INNER JOIN customers
ON orders.customer_id = customers.customer_id;


-- LEFT JOIN
SELECT customers.customer_name, orders.order_id
FROM customers
LEFT JOIN orders
ON customers.customer_id = orders.customer_id;


Common types: INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN

8๏ธโƒฃ Subqueries

What it is: Query inside another query.

SELECT name
FROM employees
WHERE salary > (SELECT AVG(salary) FROM employees);


Use cases: Comparing values, filtering based on aggregated results.

9๏ธโƒฃ Common Table Expressions (CTE)

What it is: Temporary result set used inside a query.

WITH high_salary AS (
SELECT name, salary
FROM employees
WHERE salary > 70000
)
SELECT *
FROM high_salary;


Benefits: Cleaner queries, easier debugging, better readability.

๐Ÿ”Ÿ Window Functions

What they do: Perform calculations across rows related to current row.

SELECT name, salary, RANK() OVER (ORDER BY salary DESC) AS salary_rank
FROM employees;


Common functions: ROW_NUMBER(), RANK(), DENSE_RANK(), LAG(), LEAD()

Why SQL is Critical for Data Analysts
โ€ข Extract data from databases
โ€ข Analyze large datasets efficiently
โ€ข Generate reports and dashboards
โ€ข Support business decision-making

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

Double Tap โ™ฅ๏ธ For More
โค5
๐—™๐—ฅ๐—˜๐—˜ ๐—ฉ๐—ถ๐—ฟ๐˜๐˜‚๐—ฎ๐—น ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ฒ ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐—ป๐˜€๐—ต๐—ถ๐—ฝ๐˜€ | ๐—•๐—ผ๐—ผ๐˜€๐˜ ๐—ฌ๐—ผ๐˜‚๐—ฟ ๐—ฅ๐—ฒ๐˜€๐˜‚๐—บ๐—ฒ๐ŸŽ“

These FREE virtual certificate internships can help you build practical skills, industry exposure, and resume value from top companies and global platforms โ€” all from home.

๐Ÿ’ซPerfect for students, freshers, and career starters

- PwC Power BI Virtual Internship
- British Airways Data Science Virtual Internship
- Quantium Data Analytics Virtual Internship

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

https://pdlink.in/44PEjcL

๐Ÿš€ Start learning today. Build experience. Collect certificates. Make your resume stronger.
โค1
๐Ÿš€ SQL Project Series #6: Banking Transaction Analysis ๐Ÿฆ

Learn how banks use SQL to analyze customer transactions, monitor account activity, detect fraud, and generate business insights.

๐ŸŽฏ Business Objectives

โœ… Analyze customer transactions

โœ… Calculate account balances

โœ… Identify high-value customers

โœ… Detect suspicious transactions

โœ… Monitor transaction trends

โœ… Analyze deposits vs withdrawals

โœ… Measure customer activity

โœ… Identify dormant accounts

โœ… Generate banking KPIs

๐Ÿ“‚ Step 1: Create Database

CREATE DATABASE banking_db;

USE banking_db;

๐Ÿ“‚ Step 2: Create Customers Table

CREATE TABLE customers (

customer_id INT PRIMARY KEY,

customer_name VARCHAR(100),

gender VARCHAR(10),

city VARCHAR(50),

account_open_date DATE

);

๐Ÿ“‚ Step 3: Create Accounts Table

CREATE TABLE accounts (

account_id INT PRIMARY KEY,

customer_id INT,

account_type VARCHAR(30),

branch_name VARCHAR(100),

opening_balance DECIMAL(12,2),

FOREIGN KEY (customer_id)

REFERENCES customers(customer_id)

);

๐Ÿ“‚ Step 4: Create Transactions Table

CREATE TABLE transactions (

transaction_id INT PRIMARY KEY,

account_id INT,

transaction_date TIMESTAMP,

transaction_type VARCHAR(20),

amount DECIMAL(12,2),

FOREIGN KEY (account_id)

REFERENCES accounts(account_id)

);

๐Ÿ“‚ Step 5: Insert Sample Customers

INSERT INTO customers VALUES

(1,'Rahul Sharma','Male','Mumbai','2023-01-10'),

(2,'Priya Verma','Female','Delhi','2023-02-18'),

(3,'Amit Patel','Male','Pune','2023-04-12'),

(4,'Sneha Joshi','Female','Bangalore','2023-05-22'),

(5,'Rohan Gupta','Male','Hyderabad','2023-08-01');

๐Ÿ“‚ Step 6: Insert Sample Accounts

INSERT INTO accounts VALUES

(101,1,'Savings','Mumbai',50000),

(102,2,'Savings','Delhi',35000),

(103,3,'Current','Pune',100000),

(104,4,'Savings','Bangalore',45000),

(105,5,'Current','Hyderabad',75000);

๐Ÿ“‚ Step 7: Insert Sample Transactions

INSERT INTO transactions VALUES

(1001,101,'2025-01-05 10:15:00','Deposit',15000),

(1002,101,'2025-01-06 12:30:00','Withdrawal',5000),

(1003,102,'2025-01-07 14:20:00','Deposit',25000),

(1004,103,'2025-01-08 16:10:00','Withdrawal',30000),

(1005,104,'2025-01-09 09:45:00','Deposit',12000),

(1006,105,'2025-01-10 11:00:00','Withdrawal',10000);

๐Ÿง  SQL Concepts You'll Practice

โœ” DDL Commands

โœ” DML Commands

โœ” Primary & Foreign Keys

โœ” Joins

โœ” Aggregate Functions

โœ” CASE WHEN

โœ” GROUP BY

โœ” HAVING

โœ” Window Functions

โœ” CTEs

โœ” Date & Time Functions

๐Ÿ“Š Business KPIs You Can Build

๐Ÿ“ˆ Total Transaction Amount

๐Ÿ“ˆ Total Deposits

๐Ÿ“ˆ Total Withdrawals

๐Ÿ“ˆ Net Cash Flow

๐Ÿ“ˆ Current Account Balance

๐Ÿ“ˆ Average Transaction Amount

๐Ÿ“ˆ Daily Transaction Volume

๐Ÿ“ˆ Monthly Transaction Trend

๐Ÿ“ˆ Branch-wise Transactions

๐Ÿ“ˆ Account Type Analysis

๐Ÿ“ˆ Top Customers by Transaction Value

๐Ÿ“ˆ Most Active Customers

๐Ÿ“ˆ Dormant Accounts

๐Ÿ“ˆ High-Value Transactions

๐Ÿ“ˆ Deposit vs Withdrawal Ratio

๐Ÿ“ˆ Fraud Detection Alerts

๐Ÿ“ˆ Average Balance by Branch

๐Ÿ“ˆ Customer Growth

๐Ÿ“ˆ Transaction Success Rate

๐Ÿ“ˆ Peak Transaction Hours

๐Ÿ’ก Double Tap โค๏ธ For More
โค3๐Ÿ‘1
GigaChat 3.5 Ultra Publicly Released โ€” The New Generation of the Flagship Model

The GigaChat team has released GigaChat 3.5 Ultra as open sourceโ€”a new 432B model under the MIT license. This is the first open-source hybrid of GatedDeltaNet and MLA scaled to hundreds of billions of parameters, featuring a proprietary training recipe we refined through more than 1,500 experiments. The model has grown in terms of code, mathematics, agent scenarios, and application domainsโ€”yet itโ€™s 40% smaller than GigaChat 3.1 Ultra.


Whatโ€™s inside:

๐Ÿ”˜A proprietary hybrid MLA + Gated DeltaNet architecture with a dedicated stabilization framework, without which this hybrid setup would not train reliably at this scale;
๐Ÿ”˜ Gated Attention: the model can locally down-weight overly strong signals from the attention layer;
๐Ÿ”˜GatedNorm: normalization with an explicit gate that controls signal magnitude across features;
๐Ÿ”˜Approximately 4x lower KV cache per token: with the same memory budget, the model can support 2.14x longer context and deliver a 20% throughput increase under load;
๐Ÿ”˜Two MTP heads, enabling up to 2.2x faster generation;
๐Ÿ”˜FP8 across all training stages with no quality degradation compared with bf16, enabled by custom Triton and CUDA kernels;
๐Ÿ”˜A new online RL stage after SFT and DPO.

Results:

๐Ÿ”˜ GigaChat-3.5-Ultra-Base outperforms DeepSeek V3.2 Exp Base and DeepSeek V4 Flash Base on average across a set of general, math, and code benchmarks:
๐Ÿ”˜ GigaChat-3.5-Ultra-Instruct is comparable to DeepSeek V3.2 in terms of average score, despite having half the size;
๐Ÿ”˜ According to the MiniMax-M2.7 LLM judge, the average win rate against GigaChat 3.1 Ultra is 75.9%, and against GPT-5 is 68.7%.

The entire stack โ€” data (our own LLM-filtered Common Crawl, 600+ programming languages in the code), architecture, training methodology, and infrastructure โ€” was built end-to-end by GigaChat team.

โžก๏ธ HuggingFace
Please open Telegram to view this post
VIEW IN TELEGRAM
โค3
๐—”๐—œ ๐—ถ๐—ป ๐—ฃ๐—ฟ๐—ผ๐—ฑ๐˜‚๐—ฐ๐˜ ๐— ๐—ฎ๐—ป๐—ฎ๐—ด๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐—™๐—ฅ๐—˜๐—˜ ๐—ข๐—ป๐—น๐—ถ๐—ป๐—ฒ ๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ๐—ฐ๐—น๐—ฎ๐˜€๐˜€ ๐Ÿ˜

๐Ÿ’ซ Join this live masterclass and gain practical insights into AI-powered Product Management, in-demand skills

๐Ÿ’ซRoadmap to building a successful Product Management career

Eligibility :- Recent Graduates & Working Professionals

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

https://pdlink.in/44VeqIA

( Limited Slots ..Hurry Upโ€ )

Date & Time :- 11th July 2026 , 8:00 PM (IST)
๐Ÿš€ SQL Project Series #7

Hospital Management Analysis ๐Ÿฅ

Learn how hospitals use SQL to analyze patient data, optimize operations, improve resource utilization, and generate healthcare insights.

๐ŸŽฏ Business Objectives
โœ… Analyze patient admissions
โœ… Monitor doctor performance
โœ… Track appointment trends
โœ… Measure bed occupancy
โœ… Analyze treatment costs
โœ… Identify readmitted patients
โœ… Calculate average length of stay
โœ… Improve hospital efficiency

๐Ÿ“‚ Step 1: Create Database

CREATE DATABASE hospital_db;

USE hospital_db;


๐Ÿ“‚ Step 2: Create Patients Table

CREATE TABLE patients (
patient_id INT PRIMARY KEY,
patient_name VARCHAR(100),
gender VARCHAR(10),
age INT,
city VARCHAR(50),
registration_date DATE
);


๐Ÿ“‚ Step 3: Create Doctors Table

CREATE TABLE doctors (
doctor_id INT PRIMARY KEY,
doctor_name VARCHAR(100),
specialization VARCHAR(100),
department VARCHAR(100)
);


๐Ÿ“‚ Step 4: Create Appointments Table

CREATE TABLE appointments (
appointment_id INT PRIMARY KEY,
patient_id INT,
doctor_id INT,
appointment_date DATE,
status VARCHAR(20),
consultation_fee DECIMAL(10,2),
FOREIGN KEY (patient_id) REFERENCES patients(patient_id),
FOREIGN KEY (doctor_id) REFERENCES doctors(doctor_id)
);


๐Ÿ“‚ Step 5: Create Admissions Table

CREATE TABLE admissions (
admission_id INT PRIMARY KEY,
patient_id INT,
admission_date DATE,
discharge_date DATE,
diagnosis VARCHAR(100),
treatment_cost DECIMAL(12,2),
FOREIGN KEY (patient_id) REFERENCES patients(patient_id)
);


๐Ÿ“‚ Step 6: Insert Sample Patients

INSERT INTO patients VALUES
(1,'Rahul Sharma','Male',34,'Mumbai','2024-01-05'),
(2,'Priya Verma','Female',29,'Delhi','2024-01-10'),
(3,'Amit Patel','Male',42,'Pune','2024-02-15'),
(4,'Sneha Joshi','Female',37,'Bangalore','2024-03-01'),
(5,'Rohan Gupta','Male',51,'Hyderabad','2024-03-20');


๐Ÿ“‚ Step 7: Insert Sample Doctors

INSERT INTO doctors VALUES
(101,'Dr. Mehta','Cardiology','Heart Care'),
(102,'Dr. Singh','Orthopedics','Bone Care'),
(103,'Dr. Rao','Neurology','Neuro Care'),
(104,'Dr. Shah','General Medicine','General');


๐Ÿ“‚ Step 8: Insert Sample Appointments

INSERT INTO appointments VALUES
(1001,1,101,'2025-01-05','Completed',800),
(1002,2,104,'2025-01-06','Completed',500),
(1003,3,102,'2025-01-08','Cancelled',700),
(1004,4,103,'2025-01-09','Completed',1000),
(1005,5,101,'2025-01-12','Completed',800);


๐Ÿ“‚ Step 9: Insert Sample Admissions

INSERT INTO admissions VALUES
(201,1,'2025-01-05','2025-01-10','Heart Surgery',250000),
(202,2,'2025-01-08','2025-01-11','Fever',12000),
(203,3,'2025-01-15','2025-01-22','Fracture',85000),
(204,5,'2025-01-18','2025-01-21','Cardiac Checkup',45000);


๐Ÿง  SQL Concepts You'll Practice
โœ” DDL & DML
โœ” Joins
โœ” Aggregate Functions
โœ” GROUP BY
โœ” HAVING
โœ” CASE WHEN
โœ” CTEs
โœ” Window Functions
โœ” Date Functions
โœ” Ranking Functions

๐Ÿ“Š Business KPIs You Can Build
๐Ÿ“ˆ Total Patients
๐Ÿ“ˆ Total Admissions
๐Ÿ“ˆ Total Appointments
๐Ÿ“ˆ Appointment Completion Rate
๐Ÿ“ˆ Appointment Cancellation Rate
๐Ÿ“ˆ Doctor-wise Patient Count
๐Ÿ“ˆ Department-wise Revenue
๐Ÿ“ˆ Average Consultation Fee
๐Ÿ“ˆ Average Treatment Cost
๐Ÿ“ˆ Average Length of Stay
๐Ÿ“ˆ Daily Patient Admissions
๐Ÿ“ˆ Monthly Admission Trend
๐Ÿ“ˆ Readmission Rate
๐Ÿ“ˆ Bed Occupancy Rate
๐Ÿ“ˆ Top Doctors by Patient Volume
๐Ÿ“ˆ Revenue by Department
๐Ÿ“ˆ Revenue by Doctor
๐Ÿ“ˆ Most Common Diagnosis
๐Ÿ“ˆ Patient Distribution by City
๐Ÿ“ˆ Average Patient Age

๐ŸŽฏ This project reflects the type of SQL analysis performed by Healthcare Analysts, Hospital Operations teams, Business Intelligence Analysts, and Data Analysts working in hospitals and health-tech companies.

๐Ÿ’ก Double Tap โค๏ธ For More
โค11๐ŸŽ‰2
๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ผ๐—ณ๐˜ ๐—™๐—ฅ๐—˜๐—˜ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป๐—ถ๐—ป๐—ด ๐—ฅ๐—ฒ๐˜€๐—ผ๐˜‚๐—ฟ๐—ฐ๐—ฒ๐˜€๐ŸŽ“

Offers a wide range of free learning resources through Microsoft Learn, helping students, freshers, and professionals build job-ready skills at their own pace.

โœ… 100% FREE self-paced learning modules
โœ… Official learning platform from Microsoft

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

https://pdlink.in/4paqRJS

Explore Microsoftโ€™s free resources. Build in-demand skills and make your profile stronger.
โค1
๐Ÿš€ SQL Project Series #8

Food Delivery Analytics ๐Ÿ”

Analyze customer orders, restaurant performance, delivery efficiency, and rider operations using SQL.

๐ŸŽฏ Business Objectives

โœ… Analyze food orders and revenue

โœ… Measure delivery performance

โœ… Evaluate restaurant performance

โœ… Analyze customer ordering behavior

โœ… Track delivery partner efficiency

โœ… Identify peak order hours

โœ… Reduce delivery delays

โœ… Improve customer satisfaction

๐Ÿ“‚ Step 1: Create Database

CREATE DATABASE food_delivery_db;

USE food_delivery_db;


๐Ÿ“‚ Step 2: Create Customers Table

CREATE TABLE customers (
customer_id INT PRIMARY KEY,
customer_name VARCHAR(100),
city VARCHAR(50),
signup_date DATE
);


๐Ÿ“‚ Step 3: Create Restaurants Table

CREATE TABLE restaurants (
restaurant_id INT PRIMARY KEY,
restaurant_name VARCHAR(100),
cuisine VARCHAR(50),
city VARCHAR(50),
rating DECIMAL(3,2)
);


๐Ÿ“‚ Step 4: Create Delivery Partners Table

CREATE TABLE delivery_partners (
partner_id INT PRIMARY KEY,
partner_name VARCHAR(100),
vehicle_type VARCHAR(30)
);


๐Ÿ“‚ Step 5: Create Orders Table

CREATE TABLE orders (
order_id INT PRIMARY KEY,
customer_id INT,
restaurant_id INT,
partner_id INT,
order_date TIMESTAMP,
delivery_time_minutes INT,
order_amount DECIMAL(10,2),
order_status VARCHAR(20),
FOREIGN KEY (customer_id) REFERENCES customers(customer_id),
FOREIGN KEY (restaurant_id) REFERENCES restaurants(restaurant_id),
FOREIGN KEY (partner_id) REFERENCES delivery_partners(partner_id)
);


๐Ÿ“‚ Step 6: Insert Sample Customers

INSERT INTO customers VALUES
(1,'Rahul','Mumbai','2025-01-10'),
(2,'Priya','Delhi','2025-01-12'),
(3,'Amit','Pune','2025-01-18'),
(4,'Sneha','Bangalore','2025-01-22'),
(5,'Rohan','Hyderabad','2025-01-25');


๐Ÿ“‚ Step 7: Insert Sample Restaurants

INSERT INTO restaurants VALUES
(101,'Pizza Hub','Italian','Mumbai',4.6),
(102,'Spice Villa','Indian','Delhi',4.4),
(103,'Burger Point','Fast Food','Pune',4.2),
(104,'Sushi World','Japanese','Bangalore',4.8);


๐Ÿ“‚ Step 8: Insert Sample Delivery Partners

INSERT INTO delivery_partners VALUES
(201,'Aman','Bike'),
(202,'Rohit','Scooter'),
(203,'Vikas','Bike'),
(204,'Ankit','Bicycle');


๐Ÿ“‚ Step 9: Insert Sample Orders

INSERT INTO orders VALUES
(1001,1,101,201,'2025-02-01 12:30:00',28,850,'Delivered'),
(1002,2,102,202,'2025-02-01 13:10:00',42,620,'Delivered'),
(1003,3,103,201,'2025-02-01 19:45:00',35,480,'Delivered'),
(1004,4,104,203,'2025-02-02 20:15:00',55,1200,'Delayed'),
(1005,5,101,204,'2025-02-03 18:20:00',25,760,'Delivered');
โค7
๐Ÿง  SQL Concepts You'll Practice

โœ” DDL & DML

โœ” INNER JOIN

โœ” LEFT JOIN

โœ” GROUP BY

โœ” HAVING

โœ” Aggregate Functions

โœ” CASE WHEN

โœ” CTEs

โœ” Window Functions

โœ” Date & Time Functions

๐Ÿ“Š Business KPIs You Can Build

๐Ÿ“ˆ Total Orders

๐Ÿ“ˆ Total Revenue

๐Ÿ“ˆ Average Order Value (AOV)

๐Ÿ“ˆ Average Delivery Time

๐Ÿ“ˆ On-Time Delivery Rate

๐Ÿ“ˆ Delayed Delivery Rate

๐Ÿ“ˆ Orders by Hour

๐Ÿ“ˆ Peak Ordering Hour

๐Ÿ“ˆ Orders by Day of Week

๐Ÿ“ˆ Revenue by Restaurant

๐Ÿ“ˆ Revenue by City

๐Ÿ“ˆ Top 10 Restaurants

๐Ÿ“ˆ Top Customers by Spending

๐Ÿ“ˆ Average Restaurant Rating

๐Ÿ“ˆ Delivery Partner Performance

๐Ÿ“ˆ Average Orders per Delivery Partner

๐Ÿ“ˆ Highest Revenue Cuisine

๐Ÿ“ˆ Customer Retention Rate

๐Ÿ“ˆ Repeat Order Rate

๐Ÿ“ˆ Cancellation Rate

๐Ÿ“ˆ Delivery Time by City

๐Ÿ“ˆ Delivery Time by Cuisine

๐Ÿ“ˆ Revenue Trend (Daily & Monthly)

๐Ÿ“ˆ Restaurant Market Share

๐Ÿ“ˆ Customer Lifetime Value (CLV)

๐ŸŽฏ This project simulates the SQL work performed by Data Analysts at companies like Swiggy, Zomato, Uber Eats, and DoorDash, making it an excellent portfolio project for analytics interviews.

๐Ÿ’ก Double Tap โค๏ธ For More
โค5
๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ ๐—ง๐—ต๐—ฒ๐˜€๐—ฒ ๐—›๐—ถ๐—ด๐—ต-๐——๐—ฒ๐—บ๐—ฎ๐—ป๐—ฑ ๐—ฆ๐—ธ๐—ถ๐—น๐—น๐˜€ ๐˜๐—ผ ๐—Ÿ๐—ฎ๐—ป๐—ฑ ๐—›๐—ถ๐—ด๐—ต-๐—ฃ๐—ฎ๐˜†๐—ถ๐—ป๐—ด ๐—๐—ผ๐—ฏ๐˜€ ๐Ÿ”ฅ

This guide highlights 3 powerful skills that are opening doors to high-paying roles across tech and business .๐ŸŽ“

Perfect For
๐Ÿ‘จโ€๐ŸŽ“ Students
๐Ÿ’ผ Freshers
๐Ÿ“ˆ Job seekers trying to improve employability
๐Ÿš€ Anyone who wants to build a future-proof career with better salary potential

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

https://pdlink.in/4vXeGmm

๐Ÿš€ Start learning today. Build in-demand skills. Position yourself for better opportunities and bigger career growth.
๐Ÿš€ SQL Project Series #9

HR Analytics Project ๐Ÿ‘จโ€๐Ÿ’ผ

Analyze employee data to understand workforce trends, employee performance, attrition, hiring, salaries, and organizational health using SQL.

๐ŸŽฏ Business Objectives

โœ… Analyze employee demographics

โœ… Measure employee attrition

โœ… Track hiring trends

โœ… Analyze salaries and compensation

โœ… Evaluate department performance

โœ… Monitor attendance and leave patterns

โœ… Identify high-performing employees

โœ… Generate HR dashboards

๐Ÿ“‚ Step 1: Create Database

CREATE DATABASE hr_analytics_db;

USE hr_analytics_db;


๐Ÿ“‚ Step 2: Create Departments Table

CREATE TABLE departments (
department_id INT PRIMARY KEY,
department_name VARCHAR(100)
);


๐Ÿ“‚ Step 3: Create Employees Table

CREATE TABLE employees (
employee_id INT PRIMARY KEY,
employee_name VARCHAR(100),
gender VARCHAR(10),
age INT,
department_id INT,
designation VARCHAR(100),
salary DECIMAL(10,2),
hire_date DATE,
city VARCHAR(50),
employment_status VARCHAR(20),
FOREIGN KEY (department_id)
REFERENCES departments(department_id)
);


๐Ÿ“‚ Step 4: Create Attendance Table

CREATE TABLE attendance (
attendance_id INT PRIMARY KEY,
employee_id INT,
attendance_date DATE,
status VARCHAR(20),
FOREIGN KEY (employee_id)
REFERENCES employees(employee_id)
);


๐Ÿ“‚ Step 5: Create Performance Table

CREATE TABLE performance (
review_id INT PRIMARY KEY,
employee_id INT,
review_year INT,
performance_rating DECIMAL(3,2),
bonus DECIMAL(10,2),
FOREIGN KEY (employee_id)
REFERENCES employees(employee_id)
);


๐Ÿ“‚ Step 6: Insert Sample Departments

INSERT INTO departments VALUES
(1,'Engineering'),
(2,'Human Resources'),
(3,'Finance'),
(4,'Sales'),
(5,'Marketing');


๐Ÿ“‚ Step 7: Insert Sample Employees

INSERT INTO employees VALUES
(101,'Rahul Sharma','Male',30,1,'Software Engineer',85000,'2022-01-15','Mumbai','Active'),
(102,'Priya Verma','Female',28,4,'Sales Executive',65000,'2023-03-10','Delhi','Active'),
(103,'Amit Patel','Male',35,3,'Financial Analyst',92000,'2021-06-20','Pune','Active'),
(104,'Sneha Joshi','Female',31,2,'HR Manager',78000,'2020-11-12','Bangalore','Active'),
(105,'Rohan Gupta','Male',29,5,'Marketing Specialist',70000,'2024-02-01','Hyderabad','Resigned');


๐Ÿ“‚ Step 8: Insert Sample Attendance

INSERT INTO attendance VALUES
(1,101,'2025-01-01','Present'),
(2,102,'2025-01-01','Present'),
(3,103,'2025-01-01','Absent'),
(4,104,'2025-01-01','Present'),
(5,105,'2025-01-01','Leave');


๐Ÿ“‚ Step 9: Insert Sample Performance Data

INSERT INTO performance VALUES
(1,101,2024,4.8,20000),
(2,102,2024,4.3,12000),
(3,103,2024,4.9,25000),
(4,104,2024,4.5,18000),
(5,105,2024,3.9,10000);
โค2
๐Ÿง  SQL Concepts You'll Practice

โœ” DDL & DML

โœ” Joins

โœ” Aggregate Functions

โœ” GROUP BY

โœ” HAVING

โœ” CASE WHEN

โœ” Subqueries

โœ” Common Table Expressions (CTEs)

โœ” Window Functions

โœ” Date Functions 

๐Ÿ“Š Business KPIs You Can Build

๐Ÿ“ˆ Total Employees

๐Ÿ“ˆ Active Employees

๐Ÿ“ˆ Employee Attrition Rate

๐Ÿ“ˆ Average Employee Salary

๐Ÿ“ˆ Salary by Department

๐Ÿ“ˆ Salary by Designation

๐Ÿ“ˆ Average Performance Rating

๐Ÿ“ˆ Top Performers

๐Ÿ“ˆ Bonus Distribution

๐Ÿ“ˆ Department-wise Headcount

๐Ÿ“ˆ Gender Diversity Ratio

๐Ÿ“ˆ Age Distribution

๐Ÿ“ˆ Average Employee Tenure

๐Ÿ“ˆ New Hires by Month

๐Ÿ“ˆ Employee Attendance Rate

๐Ÿ“ˆ Leave Utilization

๐Ÿ“ˆ Absenteeism Rate

๐Ÿ“ˆ Highest Paying Department

๐Ÿ“ˆ Highest Paying Job Role

๐Ÿ“ˆ Promotion Eligibility List

๐Ÿ“ˆ Performance Rating Distribution

๐Ÿ“ˆ Employee Growth Trend

๐Ÿ“ˆ Employees by City

๐Ÿ“ˆ Department-wise Attrition

๐Ÿ“ˆ Workforce Dashboard Metrics 

๐ŸŽฏ This project simulates the work performed by HR Analysts, People Analytics teams, and Business Intelligence professionals to support workforce planning and strategic decision-making.

๐Ÿ’ก Double Tap โค๏ธ For More
โค4
๐ŸŽ“ ๐—ง๐—ผ๐—ฝ ๐—–๐—ผ๐—บ๐—ฝ๐—ฎ๐—ป๐—ถ๐—ฒ๐˜€ ๐—ข๐—ณ๐—ณ๐—ฒ๐—ฟ๐—ถ๐—ป๐—ด ๐—™๐—ฅ๐—˜๐—˜ ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ ๐—ถ๐—ป ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ

Boost your resume with Industry-recognized certifications without spending a single rupee ๐ŸŒŸ

๐Ÿ“š Available from:
โœ… Google
โœ… Microsoft
โœ… Cisco
โœ… IBM
โœ… HP
โœ… Qualcomm
โœ… TCS
โœ… Infosys

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

https://pdlink.in/3SNiXKz

๐Ÿš€ Don't miss these FREE certification opportunities in 2026!
๐Ÿš€ ๐—ฃ๐—ฎ๐˜† ๐—”๐—ณ๐˜๐—ฒ๐—ฟ ๐—ฃ๐—น๐—ฎ๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ - ๐—Ÿ๐—ฎ๐˜‚๐—ป๐—ฐ๐—ต ๐—ฌ๐—ผ๐˜‚๐—ฟ ๐—ง๐—ฒ๐—ฐ๐—ต ๐—–๐—ฎ๐—ฟ๐—ฒ๐—ฒ๐—ฟ

If youโ€™re serious about starting your career in tech, this is one opportunity you shouldnโ€™t miss ๐Ÿš€

โœ… 2000+ Students Already Placed
๐Ÿค 500+ Hiring Partners
๐Ÿ’ผ Salary: โ‚น7.4 LPA
๐Ÿš€ Highest Package: โ‚น41 LPA

๐Ÿ’ป Get trained in in-demand tech skills
๐Ÿ‘จโ€๐Ÿซ Learn from industry experts
๐Ÿ“ˆ Get dedicated placement support
๐Ÿ’ธ Pay only after you land a job

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

 https://pdlink.in/42WOE5H

Hurry! Limited seats are available.๐Ÿƒโ€โ™‚๏ธ
โค1
๐Ÿš€ SQL Project Series #10

Finance & Expense Tracker Analysis ๐Ÿ’ฐ

Build a real-world finance analytics project to track income, expenses, savings, budgets, and cash flow using SQL.

๐ŸŽฏ Business Objectives

โœ… Track monthly income and expenses

โœ… Analyze spending by category

โœ… Monitor savings trends

โœ… Compare budget vs actual spending

โœ… Identify high-expense categories

โœ… Analyze cash flow

โœ… Track recurring expenses

โœ… Generate financial dashboards

๐Ÿ“‚ Step 1: Create Database

CREATE DATABASE finance_db;
USE finance_db;


๐Ÿ“‚ Step 2: Create Categories Table

CREATE TABLE categories (
category_id INT PRIMARY KEY,
category_name VARCHAR(50),
transaction_type VARCHAR(20)
);


๐Ÿ“‚ Step 3: Create Accounts Table

CREATE TABLE accounts (
account_id INT PRIMARY KEY,
account_name VARCHAR(50),
account_type VARCHAR(30),
opening_balance DECIMAL(12,2)
);


๐Ÿ“‚ Step 4: Create Transactions Table

CREATE TABLE transactions (
transaction_id INT PRIMARY KEY,
account_id INT,
category_id INT,
transaction_date DATE,
amount DECIMAL(12,2),
description VARCHAR(255),
FOREIGN KEY (account_id) REFERENCES accounts(account_id),
FOREIGN KEY (category_id) REFERENCES categories(category_id)
);


๐Ÿ“‚ Step 5: Insert Sample Categories

INSERT INTO categories VALUES
(1,'Salary','Income'),
(2,'Freelancing','Income'),
(3,'Rent','Expense'),
(4,'Groceries','Expense'),
(5,'Utilities','Expense'),
(6,'Entertainment','Expense'),
(7,'Transport','Expense');


๐Ÿ“‚ Step 6: Insert Sample Accounts

INSERT INTO accounts VALUES
(101,'Savings Account','Bank',50000),
(102,'Credit Card','Card',0),
(103,'Cash Wallet','Cash',5000);


๐Ÿ“‚ Step 7: Insert Sample Transactions

INSERT INTO transactions VALUES
(1001,101,1,'2025-01-01',85000,'Monthly Salary'),
(1002,101,3,'2025-01-03',18000,'House Rent'),
(1003,101,4,'2025-01-05',4200,'Supermarket'),
(1004,102,6,'2025-01-08',2500,'Movie & Dinner'),
(1005,103,7,'2025-01-09',800,'Cab Fare'),
(1006,101,5,'2025-01-12',2200,'Electricity Bill'),
(1007,101,2,'2025-01-18',15000,'Freelance Project');


๐Ÿง  SQL Concepts You'll Practice

โœ” DDL & DML

โœ” Joins

โœ” Aggregate Functions

โœ” GROUP BY

โœ” HAVING

โœ” CASE WHEN

โœ” CTEs

โœ” Window Functions

โœ” Date Functions

โœ” Financial Calculations

๐Ÿ“Š Business KPIs You Can Build

๐Ÿ“ˆ Total Income

๐Ÿ“ˆ Total Expenses

๐Ÿ“ˆ Net Savings

๐Ÿ“ˆ Savings Rate

๐Ÿ“ˆ Monthly Cash Flow

๐Ÿ“ˆ Income by Source

๐Ÿ“ˆ Expenses by Category

๐Ÿ“ˆ Highest Expense Category

๐Ÿ“ˆ Budget vs Actual Spending

๐Ÿ“ˆ Average Daily Spending

๐Ÿ“ˆ Monthly Spending Trend

๐Ÿ“ˆ Running Account Balance

๐Ÿ“ˆ Recurring Expense Analysis

๐Ÿ“ˆ Weekend vs Weekday Spending

๐Ÿ“ˆ Top 10 Largest Transactions

๐Ÿ“ˆ Account-wise Balance

๐Ÿ“ˆ Income Growth Rate

๐Ÿ“ˆ Expense Growth Rate

๐Ÿ“ˆ Category-wise Contribution

๐Ÿ“ˆ Financial Health Dashboard

๐ŸŽฏ This project reflects real-world SQL work performed by Financial Analysts, FP&A teams, FinTech companies, banks, and Business Intelligence professionals to monitor financial performance and support better decision-making.

๐Ÿ’ก Double Tap โค๏ธ For More
๐Ÿ‘3
๐Ÿš€ ๐—ง๐—ผ๐—ฝ ๐Ÿฑ ๐—ฆ๐—ธ๐—ถ๐—น๐—น๐˜€ ๐—ง๐—ผ ๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ ๐—œ๐—ป ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ โ€“ ๐—˜๐—ป๐—ฟ๐—ผ๐—น๐—น ๐—™๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜! ๐ŸŽ“

Want to build a high-paying, future-ready career? ๐Ÿ”ฅ Start learning the most in-demand skills:

๐Ÿ’ซ AI & ML :- https://pdlink.in/4phANS2
โ€‹
๐Ÿ“Š Data Analytics :- https://pdlink.in/4wh2ugB
โ€‹
๐Ÿ” Cyber Security :- https://pdlink.in/4wCW7DJ
โ€‹
โ˜๏ธ Cloud Computing :- https://pdlink.in/4yhBuie
โ€‹
๐Ÿ’ป Other Tech Skills :- https://pdlink.in/4peUslB
โ€‹
๐Ÿ“ข Share with your friends & college groups! ๐Ÿš€๐Ÿ”ฅ
๐Ÿš€ SQL Project Series #11

Netflix Content Analytics ๐ŸŽฌ

Analyze movies and TV shows to uncover trends in content production, genres, ratings, countries, and audience preferences using SQL.

๐ŸŽฏ Business Objectives

โœ… Analyze the Netflix content library

โœ… Compare Movies vs TV Shows

โœ… Identify popular genres

โœ… Analyze content ratings

โœ… Track yearly content additions

โœ… Discover country-wise content trends

โœ… Measure content duration

โœ… Generate executive dashboards

๐Ÿ“‚ Step 1: Create Database

CREATE DATABASE netflix_db;
USE netflix_db;


๐Ÿ“‚ Step 2: Create Content Table

CREATE TABLE netflix_content (
show_id VARCHAR(20) PRIMARY KEY,
title VARCHAR(255),
content_type VARCHAR(20),
director VARCHAR(255),
country VARCHAR(100),
release_year INT,
date_added DATE,
rating VARCHAR(20),
duration VARCHAR(30),
genre VARCHAR(100)
);


๐Ÿ“‚ Step 3: Insert Sample Data

INSERT INTO netflix_content VALUES
('S1','Stranger Things','TV Show','The Duffer Brothers','United States',2016,'2022-01-10','TV-14','4 Seasons','Drama'),
('S2','Money Heist','TV Show','รlex Pina','Spain',2017,'2022-02-15','TV-MA','5 Seasons','Crime'),
('S3','Extraction','Movie','Sam Hargrave','United States',2020,'2022-03-01','R','116 min','Action'),
('S4','The Crown','TV Show','Peter Morgan','United Kingdom',2016,'2022-04-18','TV-MA','6 Seasons','Drama'),
('S5','Leo','Movie','Lokesh Kanagaraj','India',2023,'2024-01-20','UA','164 min','Action');


๐Ÿง  SQL Concepts You'll Practice

โœ” DDL and DML

โœ” Filtering and Sorting

โœ” Aggregate Functions

โœ” GROUP BY

โœ” HAVING

โœ” CASE WHEN

โœ” Date Functions

โœ” Window Functions

โœ” CTEs

โœ” Ranking Functions

๐Ÿ“Š Business KPIs You Can Build

๐Ÿ“ˆ Total Titles

๐Ÿ“ˆ Movies vs TV Shows

๐Ÿ“ˆ Content Added by Year

๐Ÿ“ˆ Content Added by Month

๐Ÿ“ˆ Content by Country

๐Ÿ“ˆ Top 10 Producing Countries

๐Ÿ“ˆ Genre Distribution

๐Ÿ“ˆ Most Popular Ratings

๐Ÿ“ˆ Content by Release Year

๐Ÿ“ˆ Oldest and Newest Titles

๐Ÿ“ˆ Average Movie Duration

๐Ÿ“ˆ Longest Movie

๐Ÿ“ˆ TV Shows by Number of Seasons

๐Ÿ“ˆ Top Directors by Number of Titles

๐Ÿ“ˆ Content Growth Trend

๐Ÿ“ˆ Rating-wise Distribution

๐Ÿ“ˆ Action vs Drama vs Comedy Analysis

๐Ÿ“ˆ Percentage of Movies vs TV Shows

๐Ÿ“ˆ Country-wise Content Contribution

๐Ÿ“ˆ Executive Content Dashboard

๐ŸŽฏ This project reflects the type of SQL analysis performed by media companies, streaming platforms, entertainment analysts, and business intelligence teams to understand content strategy and audience trends.

๐Ÿ’ก Double Tap โค๏ธ For More
โค10