AI SQL Copilot is an intelligent SQL generation platform that converts plain English instructions into valid SQL queries using Google's Gemini AI. It combines AI-powered query generation, SQL validation, conversation history, and a modern glassmorphism interface to create an intuitive SQL assistant for developers, students, and database learners.
Writing SQL queries manually can be time-consuming, especially for beginners. AI SQL Copilot bridges the gap between natural language and database operations by allowing users to describe what they need in plain English.
Example:
Input
Create an employee table with employee_id, employee_name and salary.
Output
CREATE TABLE employees (
employee_id INT PRIMARY KEY,
employee_name VARCHAR(255),
salary DECIMAL(10,2)
);Generate SQL queries directly from natural language prompts.
Automatically validates generated SQL before displaying results.
Stores previous conversations and allows users to restore past queries.
One-click copy and SQL file download functionality.
Premium glassmorphism design with smooth animations and responsive layout.
Tracks generated query count during usage.
Improved SQL readability through code highlighting.
Works seamlessly across desktop and mobile devices.
- Python
- Flask
- Google Gemini API
- HTML5
- CSS3
- JavaScript
- SQLParse
- python-dotenv
AI_SQL_CHATBOT/
├── app.py
├── requirements.txt
├── .env
├── chatbot/
│ ├── sql_generator.py
│ └── validator.py
├── templates/
│ └── index.html
├── static/
│ ├── css/
│ │ └── style.css
│ │
│ ├── js/
│ │ └── script.js
│ │
│ └── images/
└── screenshots/
git clone https://github.com/YOUR_USERNAME/AI-SQL-Copilot.gitcd AI-SQL-Copilotpip install -r requirements.txtCreate a .env file:
GEMINI_API_KEY=YOUR_API_KEYpython app.pyOpen:
http://127.0.0.1:5000
- Create employee table with id, name and salary
- Show employees earning above 50000
- Join employees and departments
- Find top 10 highest salaries
- Create customer table with email validation
- Display orders placed in the last 30 days
(Add Screenshot Here)
(Add Screenshot Here)
(Add Screenshot Here)
- Multi-database support
- Query optimization suggestions
- SQL explanation mode
- Dark/Light theme switcher
- Database schema awareness
- Export to PDF
Sai Srikar Bommisetty
Passionate about Artificial Intelligence, Machine Learning, Full-Stack Development, and building intelligent software solutions.
If you found this project useful, consider giving it a star.