Native graphs from database based on SQLs

Hello,

A nice thing to have in HA would be to have the possibility to build graphs from a set of values retrieved via a ANSI SQL command from its own HA database (or maybe any other databases).
Eg. grouping in specific ways, multiple specific values.
“SQL” platform component is nice, but is limited to retrive a single column value at once, and not a set of data.
Grafana/Influx offers this, but would be interesting to have natively in Home Assistant, to avoid having new addons running.

Thanks.