Skip to content

ViciousArticWolf/SQL_Script_basic_syntaxes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

SQL_Script_basic_syntaxes

πŸ“Œ SQL Proficiency Demo β€” MySQL Project

A fully working MySQL database project showcasing core SQL concepts used in real-world systems. The project includes schema design, sample data, indexes, views, transactions, joins, aggregations, reporting queries, and more β€” all written using clean, beginner-friendly MySQL syntax.

This repository is meant to demonstrate SQL skills for interviews, resumes, and technical evaluations.

πŸš€ Features Demonstrated βœ”οΈ Database & Schema Design

Normalized e-commerce schema

Tables: users, products, suppliers, orders, order_items, inventory, employees, departments, audit_logs

Primary keys, foreign keys, constraints

βœ”οΈ Core SQL (DML + DDL)

CREATE, ALTER, DROP

INSERT, UPDATE, DELETE

Bulk sample data for testing

βœ”οΈ Select Queries

WHERE, AND/OR, LIKE, IN, BETWEEN

Sorting + Limiting: ORDER BY, LIMIT

βœ”οΈ Joins

INNER JOIN, LEFT JOIN, RIGHT JOIN

SELF JOIN for employee-manager hierarchy

CROSS JOIN for Cartesian examples

βœ”οΈ Aggregation & Grouping

GROUP BY, HAVING

Category revenue report

User lifetime spend

Monthly revenue analytics

Cohort analysis (first order month)

βœ”οΈ Subqueries & UNION

Scalar subqueries

Subqueries in UPDATE statements

UNION & UNION ALL

βœ”οΈ Transactions

START TRANSACTION

SAVEPOINT & ROLLBACK

Demonstrates atomic operations

βœ”οΈ Views

customer_order_summary view for analytics

βœ”οΈ Indexing

Email index

Category index

User-order index

Inventory lookup index

βœ”οΈ Reporting Queries

Monthly revenue

Low inventory alerts

Customer RFM-like metrics

Top-selling categories

πŸ› οΈ Tech Stack

MySQL 8+

Standard SQL (features covered in beginner-friendly SQL notes)

No advanced PG-only features

Portable, interview-approved syntax

πŸ“‚ Project Structure / β”œβ”€β”€ README.md # You're reading it β”œβ”€β”€ demo_mysql.sql # Main SQL script (schema + data + queries) └── screenshots/ # Optional: results, ERD diagrams, etc.

πŸ§ͺ How to Run

Install MySQL 8+

Open MySQL Workbench OR terminal

Run:

SOURCE demo_mysql.sql;

Execute the query sections inside the script:

Demonstration queries

Reporting queries

View + Index checks

Transaction examples

The database demo_mysql will be created automatically.

🎯 What This Project Proves (For Recruiters)

This project showcases your ability to:

Design relational databases thoughtfully

Write optimized SQL queries

Use joins/aggregations for business reporting

Handle transactions safely

Index tables for performance

Produce analytics directly from SQL

Think like an engineer, not just run queries

Great for:

Data Analyst roles

Backend roles

Database Engineering

Product Analyst / BI

Internship applications

Placements / fresher roles

πŸ“ˆ Sample Outputs

You can add screenshots later, such as:

ERD diagram

Output of customer summary

Output of monthly revenue

Low inventory alerts

Putting visuals in GitHub dramatically increases recruiter engagement.

πŸ“œ License

MIT License β€” free for anyone to use or build on.

⭐ Contribute

Want to improve this project?

Add stored procedures

Add triggers

Add a bigger dataset (500–10k rows)

Add sample analytics dashboards

Pull requests welcome.

About

A SQL script with important and frequently used syntaxes. Random values are used for demonstration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published