This project explores Sakila Database using SQL Magic (%%sql) in Jupyter Notebook while connecting to a MySQL database hosted on XAMPP. It includes various Data Manipulation (DML) and Aggregation queries, providing insights into customer rentals, payments, and movie statistics.
- Database Connection: Using SQL Magic (%%sql) to connect MySQL with Jupyter Notebook.
- Data Retrieval: SELECT queries with filtering, sorting, and joins.
- Data Manipulation: INSERT, UPDATE, DELETE operations.
- Aggregation & Analysis: SUM, COUNT, AVG, GROUP BY, HAVING.
- Subqueries & Transactions: Ensuring ACID compliance in MySQL.
Before running the notebook, install ipython-sql for SQL Magic in Jupyter:
pip install ipython-sql
- Open XAMPP Control Panel
- Start Apache & MySQL
In your Jupyter Notebook, run:
%load_ext sql
%sql mysql+pymysql://root:@localhost/sakila
🔹 Note: Adjust credentials (root, localhost, sakila) if needed.
MD SAMIAL HASAN SOHAN