SQL generating by model based on user's query

Prompt:
How to create prompt so that the model(suggest best model) can understand the mysql table schema and could able to create SQL based on user’s query.