The hard part is the SQL query, because you need to make sure the SQL query is safe to execute. Collecting data is far easier by comparison, but you absolutely could use an LLM for that too.
I think a lot of use cases could just be 1) set up a database with only public data and 2) use a read-only user.
The much tricker use case is those where you want to allow inserts and updates but only on specific tables or rows.
HeimdaLLM can allowlist functions and constrain queries to ensure that required conditions exist. This makes LLM + database usage have far more utility, for example, a user can be restricted to only data in their account. Support for INSERT and UPDATE is coming very soon.