Yes you are right, I'm afraid I only looked at the seconds and milliseconds bit and assumed they were identical.
Yes, why not?

[{"id":"52f260250a409ad4","type":"inject","z":"e3e44c2c66857cbf","g":"203747e9378668ca","name":"SQL","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"select created, mainsvoltage from sensordata where mainsvoltage is not null order by id desc limit 5","payload":"","payloadType":"date","x":110,"y":1000,"wires":[["ba2cd018bdfdedd8"]]},{"id":"ba2cd018bdfdedd8","type":"link call","z":"e3e44c2c66857cbf","g":"203747e9378668ca","name":"DB","links":["864559a5caeb4a28"],"linkType":"static","timeout":"30","x":250,"y":1000,"wires":[["abd537c643fa472c"]]},{"id":"abd537c643fa472c","type":"ui-chart","z":"e3e44c2c66857cbf","g":"203747e9378668ca","group":"bf3d065c8f9a2c73","name":"","label":"Mains voltage","order":2,"chartType":"line","category":"Voltage","categoryType":"str","xAxisLabel":"","xAxisProperty":"created","xAxisPropertyType":"property","xAxisType":"time","xAxisFormat":"","xAxisFormatType":"auto","xmin":"","xmax":"","yAxisLabel":"","yAxisProperty":"mainsvoltage","yAxisPropertyType":"property","ymin":"180","ymax":"260","bins":10,"action":"replace","stackSeries":false,"pointShape":"false","pointRadius":4,"showLegend":true,"removeOlder":1,"removeOlderUnit":"3600","removeOlderPoints":"","colors":["#0095ff","#ff0000","#ff7f0e","#2ca02c","#a347e1","#d62728","#ff9896","#9467bd","#c5b0d5"],"textColor":["#666666"],"textColorDefault":true,"gridColor":["#e5e5e5"],"gridColorDefault":true,"width":"8","height":8,"className":"red","interpolation":"step","x":420,"y":1000,"wires":[[]]},{"id":"bf3d065c8f9a2c73","type":"ui-group","name":"Chart","page":"3d714c1c4caec402","width":"8","height":1,"order":1,"showTitle":false,"className":"","visible":"true","disabled":"false","groupType":"default"},{"id":"3d714c1c4caec402","type":"ui-page","name":"Octopus Consumption","ui":"a3e614cd9df4ae2e","path":"/octopus","icon":"home","layout":"grid","theme":"0d92c765bfad87e6","breakpoints":[{"name":"Default","px":"0","cols":"3"},{"name":"Tablet","px":"576","cols":"6"},{"name":"Small Desktop","px":"768","cols":"9"},{"name":"Desktop","px":"1024","cols":"12"}],"order":1,"className":"","visible":"true","disabled":"false"},{"id":"a3e614cd9df4ae2e","type":"ui-base","name":"My Dashboard","path":"/dashboard","includeClientData":true,"acceptsClientConfig":["ui-notification","ui-control"],"showPathInSidebar":false,"navigationStyle":"default","titleBarStyle":"default"},{"id":"0d92c765bfad87e6","type":"ui-theme","name":"Basic Blue Theme","colors":{"surface":"#4d58ff","primary":"#0094ce","bgPage":"#eeeeee","groupBg":"#ffffff","groupOutline":"#cccccc"},"sizes":{"pagePadding":"12px","groupGap":"12px","groupBorderRadius":"4px","widgetGap":"12px"}},{"id":"3a500093dc6716c8","type":"global-config","env":[],"modules":{"@flowfuse/node-red-dashboard":"1.30.2"}}]
Although you don't have my database I included my MariaDB SQL statement so that you can see how straightforward it is to get from a query to a chart with no jiggery-pokery in between.
This is the output from the query
[{"created":"2026-02-07T15:30:00.000Z","mainsvoltage":229},{"created":"2026-02-07T15:15:02.000Z","mainsvoltage":225},{"created":"2026-02-07T15:00:00.000Z","mainsvoltage":231},{"created":"2026-02-07T14:45:02.000Z","mainsvoltage":228},{"created":"2026-02-07T14:30:00.000Z","mainsvoltage":229}]
If you had shared your query as requested my response could have been tailored to your db structure rather than mine ...