SQL Query Generator 🔍
Ever wished you could chat with your database? Well, now you can! This project brings your CRM data to life, letting you ask questions in plain English and get answers in beautiful charts or lists. No SQL knowledge required – just your curiosity! 🧠✨
🌐 Project Overview
This SQL Query Generator is all about simplifying how users interact with their CRM. Instead of navigating through complex dashboards or learning SQL, users can now just ask questions like, "What's my total revenue?" or "How many leads were generated last month?" The system then automatically generates the SQL queries needed to pull up the exact data they need. It's like having a personal data assistant that speaks your language! 🗣️🤝
This project was developed for Alpha CRM, a company dedicated to enhancing CRM experiences for businesses.
🧠 How It Works
- You ask a question (e.g., "How many leads did we generate last month?") 🤔
- Our AI translates it into SQL (the language databases speak)
- The query is executed on the CRM database
- Results pop up as a list or graph 📈
🛠️ Tech Stack
- LLM: Used GPT-4 from OpenAI
- Validation: Applied Pydantic with Instructor to structure the LLM's output.
- Deployment: Deployed the API on Google Cloud with a Cloud Function.
- User Interface: Created a secure and simple interface using Streamlit for testing SQL queries.
- Data Visualization: Used Plotly to make interactive charts from the data.
- Data Management: Managed and tested SQL queries with Supabase on a PostgreSQL database.
💡 Why It's Awesome
- No SQL? No Problem: Ask questions in plain English 🗣️
- Data Visualization: Turn boring numbers into exciting visuals 🎨
- Time-Saver: Get insights in seconds, not hours ⏱️
- User-Friendly: If you can ask a question, you can use this tool 🤗
📈 Skills Acquired
- AI Integration: Built a system that turns natural language into SQL queries.
- API Development: Deployed a secure 🔒 and scalable API on Google Cloud.
- Data Visualization: Improved my ability to create interactive charts with Plotly 📊.
- Error Handling: Created a strong 💪🏼 system to manage errors and keep things running smoothly.
🎉 Conclusion
This project was a blast to work on! 🎊 Not only did it push my technical skills to the next level, but it also allowed me to create something truly useful. The SQL Query Generator makes accessing CRM data super easy and shows how powerful AI can be when it comes to simplifying complex tasks. This project is a great example of how technology can be used to break down barriers and make data more accessible to everyone.