defog-ai / sqlcoder

SoTA LLM for converting natural language questions to SQL queries
Apache License 2.0
3.17k stars 198 forks source link

Can sqlcoder generate Mysql query? #57

Closed Peroplex closed 5 months ago

Peroplex commented 7 months ago

The model can generate postgre query with ILIKE and NULLS LAST, and Mysql can't use them. How to solve the problem?

yanxuexu007 commented 6 months ago

Same question. Does any prompt format support to return the sql query format which I need?

davezflo commented 6 months ago

Agreed - I'd like to use this with Sqlite (simple DB). Is there any way to prompt this to not use postgres-only syntax??

buddyroo30 commented 6 months ago

You could potentially use this to convert a generated PostgreSQL query to your desired format (like MySQL): https://github.com/tobymao/sqlglot

davezflo commented 6 months ago

You could potentially use this to convert a generated PostgreSQL query to your desired format (like MySQL): https://github.com/tobymao/sqlglot

Thanks @buddyroo30 - I may give that a shot. I've just been playing around with this LLM and Phi-2 to generate queries from English and then visualizations from the results. (https://github.com/davezflo/dbviz). I ended up going with postgreSQL, but I still have a sqlite3 version. This tool might help me, no?

github-actions[bot] commented 5 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 5 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.