[–] meghan_rain 3y ago ↗ Note that this entire "open source" project is basically just a wrapper around this closed source third-party LLM prompt:> Translate this natural language query into SQL:\n\n"${query}"\n\n${tableSchema ? `Use this table schema:\n\n${tableSchema}\n\n` : ''}SQL Query:https://github.com/whoiskatrin/sql-translator/blob/main/src/...
[–] Stephen_0xFF 3y ago ↗ I’m going to make a search site, but I’ll just call google under the hood. Host it on GitHub and call it open source.
[–] 8n4vidtmkvmk 3y ago ↗ It's failing.> list the oldest person in each household, their full name and age and how many people are in the householdMaybe I didn't express that nicely, but it's output is:> select max(age) as age, full_name, count(*) as num_people from household group by household;The full_name won't necessarily be for the oldest person (or it'll fail because it's not in the group by). That's the whole tricky part.
4 comments
[ 3.2 ms ] story [ 26.1 ms ] thread> Translate this natural language query into SQL:\n\n"${query}"\n\n${tableSchema ? `Use this table schema:\n\n${tableSchema}\n\n` : ''}SQL Query:
https://github.com/whoiskatrin/sql-translator/blob/main/src/...
> list the oldest person in each household, their full name and age and how many people are in the household
Maybe I didn't express that nicely, but it's output is:
> select max(age) as age, full_name, count(*) as num_people from household group by household;
The full_name won't necessarily be for the oldest person (or it'll fail because it's not in the group by). That's the whole tricky part.