SQLGenius is a web application built with Streamlit, designed to assist users in generating SQL queries effortlessly. Simply input your query in English, and let SQLGenius translate it into a valid SQL query snippet. The tool provides not only the generated SQL query but also the expected output and an explanation for better understanding.
- English to SQL translation
- Streamlined interface with Streamlit
- Insightful explanations for generated queries
- Quick access to expected query output
Before running the application, make sure you have the following installed:
- Python 3.x
- Pip (Python package installer)
- Clone the repository to your local machine
- Install the required Python packages
-
Obtain a Google API key from the Google Cloud Console.
-
Insert your API key in the
config.py
file:# config.py GOOGLE_API_KEY = "INSERT_YOUR_API_KEY_HERE"
-
Open a terminal and navigate to the project directory.
-
Run the Streamlit app:
streamlit run Sql_Quer_Generator.py
-
Open your web browser and go to http://localhost:8501 to access the application.
-
Enter your SQL query in English in the provided text area.
-
Click the "Generate SQL Query" button.
-
Explore the generated SQL query, expected output, and query explanation.