AI English-to-SQL Builder

Job ID: 39747926

Budget: $30 – $250 USD

I’m developing a natural-language interface that lets end-users type plain English questions and instantly receive valid SQL statements targeted at a MySQL database with four tables. GPT will be the sole large-language model powering the conversion pipeline.

Core flow
• User enters a request such as: “Find all orders in the last two weeks where city is ABC and the ZIP codes are 1234, 73737 or 38237.”
• Your component turns that text into an executable SELECT statement, checks the syntax against MySQL, and—when an error is returned—adjusts the prompt or SQL and retries automatically until the statement is valid.
• The service responds with the final SQL plus any warnings or assumptions it made.

What I need from you
1. A curated training dataset that covers dozens of realistic English prompts and their equivalent SQL for the four tables (schema will be provided).
2. A conversion module built around GPT (open-ai, function calling, or GPT-powered RAG—whichever you prefer) that exposes a simple API endpoint or lightweight front-end.
3. A validation layer that pings MySQL to confirm syntax before returning the result, looping back to GPT for self-correction when needed.
4. Brief documentation so I can extend the table list or add more query patterns later.

I anticipate most queries will be straightforward SELECTs, but please architect the solution so JOINs or aggregate functions can be slotted in without a rewrite.

If you’ve previously built natural-language SQL tools, show me a quick demo link or snippet when you bid; it will speed up the selection process.

-
order_table
user_account
order_delivered
order_shipped.
--
order table is the main table..
join by id and date.
if record exists in order_delivered , set status ad delivered,
else if record exists in order_shipped set status as shipped else
set status as new.

also join user_account.. match on id.. and get the name from user_account.


ex query
select order_table.*, user_account.name, status