Using AI to create new SQL in reports

GRM Reports Build and share your cool customized reports built w/ SQL, JS and Lua

Moderator: Renato

Post Reply
MlinMMEX
Super User
Posts: 115
Joined: Wed Jul 24, 2024 6:16 pm
Are you a spam bot?: No

Using AI to create new SQL in reports

Post 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?
MlinMMEX
Super User
Posts: 115
Joined: Wed Jul 24, 2024 6:16 pm
Are you a spam bot?: No

Re: Using AI to create new SQL in reports

Post 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:
Attachments
3 some GRM Tables optimization v2 20250327b.docx
(105.63 KiB) Downloaded 46 times
2 some GRM Tables optimization v1 20250327.docx
(33.5 KiB) Downloaded 39 times
1 Analyze the DB model 20250324.docx
(132.81 KiB) Downloaded 33 times
guangong
Developer
Posts: 644
Joined: Wed Dec 21, 2011 5:58 am
Are you a spam bot?: No
Contact:

Re: Using AI to create new SQL in reports

Post 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.
Post Reply