I am a newbie here and am looking for ways that I could expose a SQL query that returns multiple rows and columns via Hass, preferably through the REST API. Basically, I have a custom database table that is populated with many data. I would like to aggregate those data (hence many columns) and present it somehow in a figure/plot in HADashboard.
I had a look at SQL sensor and it seems like it only accepts maximum one row and one column. I don’t want to create a sensor for each column/row pairs, and I cannot figure out how the SQL sensor will store anything in the attributes.