The ExecuteQuery action needs an object from your domain model with attributes that match the column names that are returned by your statement. If you want to do it generic, you will not be able to get the complete tables. You could only retrieve a subset of the table columns (those who are matching with your entity). You can use aliases in your sql statement to make the column names match your entity attribute names. I still think that they need to be the same datatype but I can imagine that it might be possible to build something with it that matches your needs.
I would suggest to split your two issues, because its not clear if you have issues with showing the graph or with retreiving the sql-query data.
First create this SQL_data table and a new/edit page to add rows and manually fill it with some rows.
Then create the page with the barchart / graph with a datasource microflow for the series that returns a list of all the rows in the table.
Once that is solved, you can try to change the datasource microflow in a way that it executes the SQL query to retrieve the data from another source…
Go make it!