vanna-ai / vanna

🤖 Chat with your SQL database 📊. Accurate Text-to-SQL Generation via LLMs using RAG 🔄.
https://vanna.ai/docs/
MIT License
11.04k stars 862 forks source link

Why is the data in the order date row of the data table incorrect? #307

Closed jeffreyrobeson closed 6 months ago

jeffreyrobeson commented 6 months ago

Describe the bug Why is the data in the order date row of the data table incorrect? The Plotly chart is correct. How can I correct this error?

872790ac236e0b44f83471775bbb903e

81b320e7a9090c68791823b18a589e12

Desktop (please complete the following information where):

Additional context Add any other context about the problem here. SELECT 下单日期, SUM(已分账收益) AS 已分账收益总额, SUM(未分账收益) AS 未分账收益总额, SUM(已分账收益 + 未分账收益) AS 总收益 FROM orders GROUP BY 下单日期;

jeffreyrobeson commented 6 months ago

upgrade to vanna-0.3.0

pip install --upgrade vanna The problem has been solved.

jeffreyrobeson commented 6 months ago

The problem has been solved.

zainhoda commented 6 months ago

@jeffreyrobeson thanks! In this particular case it looks like the generated SQL query does not contain an order by so the results in the table wouldn't be expected to be sorted. Plotly might be sorting the dates automatically under the hood.