Inspiration

What it does

How we built it

Challenges we ran into

Inspiration

Working with data often requires users to understand SQL before they can get useful information from a database. We wanted to make data querying more accessible by allowing users to ask questions in natural language instead of writing SQL manually.

For example, instead of writing a complex SQL query, a user can simply ask:

"What is the total sales by region?"

DataQuery AI transforms that question into a structured SQL query and explains what the query does.

What We Built

DataQuery AI is an AI-powered natural-language-to-SQL assistant.

Users can type questions about their data in plain English. The system processes the question and generates the corresponding SQL query. It also identifies the relevant tables and columns and provides a simple explanation of the generated query.

The application includes:

  • Natural-language question input
  • Automatic SQL generation
  • Detected tables and columns
  • SQL explanation
  • SQL copy-to-clipboard functionality
  • Light and dark mode
  • Loading and error states
  • Frontend-to-backend API communication

How We Built It

The project uses a React + Vite frontend connected to a Python FastAPI backend.

The frontend provides the interactive user interface, while the backend exposes the /generate-sql API endpoint that receives the user's question and returns the generated SQL, explanation, detected tables, and detected columns.

The frontend and backend communicate through a REST API, keeping the application modular and easy to extend.

Challenges We Faced

One of our main challenges was connecting the frontend and backend reliably in a local development environment.

We also faced Python dependency and version compatibility issues during backend setup. We solved this by using Python 3.12 with a dedicated virtual environment and installing the required dependencies.

Another challenge was designing a simple interface that presents the generated SQL and supporting information clearly without overwhelming the user.

What We Learned

Through this project, we learned how to connect a React frontend with a FastAPI backend, design and consume REST APIs, handle asynchronous API requests, and manage loading and error states.

We also learned how natural-language interfaces can simplify interaction with structured data and make SQL-based data querying more accessible.

Future Vision

Our vision is to evolve DataQuery AI into a complete intelligent data analysis assistant that makes interacting with data as simple as asking a question.

Accomplishments that we're proud of

What we learned

What's next for DataQuery AI – Intelligent Natural Language to SQL Assistant

Built With

Share this project:

Updates

posted an update

I developed the project end-to-end, including the React frontend, FastAPI backend, API integration, natural-language-to-SQL workflow, user interface, testing, and GitHub setup. I also worked on debugging the local environment and connecting the frontend with the backend.

Log in or sign up for Devpost to join the conversation.