Query MySQL and displaying it in a dashboard Chart

For the top flow, I have tried writing MQTT message to the database, so its saving data to MySQL.

for the bottom flow, what I am currently trying to achieve is to just hoping the program returning me a value, and able to display it on the dashboard.

Note : All this are just for testing purposes

Regads,

Jack