defog-ai / sqlcoder

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

Sql not applicable to Mysql or ODPS #109

Closed aso233 closed 3 months ago

aso233 commented 5 months ago

The generated SQL statement is not applicable to MySQL or ODPS if it contains statements with functions such as date_trunc, date_part, and CURRENT_DATE. These seem to be PostgreSQL functions.

Is there any way to generate SQL statements for a specific database type in the model?

aso233 commented 5 months ago

I have tried to prompt the model like this:

The generated SQL statement must follow the MySQL syntax specification. Do not use method like: date_trunc、date_part、CURRENT_DATE

But it doesn't works.

JennieGao-njust commented 5 months ago

I have tried to prompt the model like this:

The generated SQL statement must follow the MySQL syntax specification. Do not use method like: date_trunc、date_part、CURRENT_DATE

But it doesn't works. I encountered the same problem, have you solved it?

FaizelK commented 4 months ago

@aso233 we have been asking from 2023 but I think the guys are not focused on opensource anymore, see this link I am refering to

https://github.com/defog-ai/sqlcoder/issues/11

github-actions[bot] commented 3 months ago

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

github-actions[bot] commented 3 months ago

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