vpaineni/SQL-Query-Agent ? reverse-engineered prompt
Reverse engineered prompt
Build me a Streamlit app that lets someone ask plain English questions and get safe PostgreSQL queries back.
I want a simple workspace where I can connect to a sample Postgres database or upload my own schema file, then type something like “show me last month’s orders by customer” and see the generated SQL, a plain English explanation, and the results if it is a read only query. If the query is a write or invalid one, it should still show it for review but not run it. Please validate the SQL properly, format it nicely, and make the app refuse anything unsafe.
Also add a schema explorer so I can inspect tables, columns, keys, and relationships, plus a learning area with basic SQL help, examples, and practice prompts. I’d like a session history panel too, so I can search previous questions, reuse them, and download queries. Use the current docs online if you need to, and make the UI clean and easy to use.
Are you gonna build this?
make sure you review the code using coderabbit