Page 1 of 1

Using AI to create new SQL in reports

Posted: Sat Mar 22, 2025 12:55 pm
by MlinMMEX
Hello,
As the DB schema is accessible in https://github.com/moneymanagerex/datab ... tables.sql
and it is easy for AI (LLM models) access to the web, I've tried some output with Generative AI into the SQL reporting, but gave errors... :roll:

This post is to get a line of work, if it feasible, to get easier SQL queries from natural language, as https://www.sqlai.ai/ does
As the first step, I used this with Perplexity.ai
PROMPT: create a query in SQL to list transactions of expenses from year to date, given the database schema in url https://github.com/moneymanagerex/datab ... tables.sql

What kind of reports am I missing? More oriented to "report configuration", as
  • Selecting dates
    Filtering data (categories, accounts, tags, etc)
    Grouping totals
    Adding different aggregators (as percentages) for fields (count, sum, etc)
Does this line of work make sense?

Re: Using AI to create new SQL in reports

Posted: Thu Mar 27, 2025 6:23 pm
by MlinMMEX
Hello @guangong
it might be helpful to find some suggestions on database optimization and changes in the model for optimization.
See attached documents.

I am personally quite worried :? because I am not able to get the info I really need, :roll: I am considering moving away from MMEX. :cry:

Re: Using AI to create new SQL in reports

Posted: Fri Mar 28, 2025 4:05 am
by guangong
What a pity for both.
It seems that AI can't help and survive here without a full picture. All analysis and optimization are around performance.