I am not sure this approach is doable since GPT-4 is capable of solving assignments that GPT-3.5 get wrong. Example GPT-3.5 fails to solve the prompt (with the dvdrental sample database schema added [1]):
> find customers who didn't rent a movie in the last 12 months but rented a movie in the 12 months before that
GPT-4 solves this without a problem [2]. Combining logic like (without additional database schema added):
> find all users who lives in Paris using lat/lng and who visited the south of France within the last month
GPT-3.5 can't understand this at all, GPT-4 solves it [3].
> find customers who didn't rent a movie in the last 12 months but rented a movie in the 12 months before that
GPT-4 solves this without a problem [2]. Combining logic like (without additional database schema added):
> find all users who lives in Paris using lat/lng and who visited the south of France within the last month
GPT-3.5 can't understand this at all, GPT-4 solves it [3].
[1]: https://www.postgresqltutorial.com/postgresql-getting-starte...
[2]: https://aihelperbot.com/snippets/cljy8km2h0000my0fgq8kut5w
[3]: https://aihelperbot.com/snippets/cljy8q6gz000al70fvfzxt2hh